[−][src]Struct swim_structure::item::Value
Item
variant representing an unkeyed value.
Methods
impl<'a> Value<'a>
[src]
pub fn try_hold_str(
hold: &dyn Hold<'a>,
data: &str
) -> Result<Value<'a>, HoldError>
[src]
hold: &dyn Hold<'a>,
data: &str
) -> Result<Value<'a>, HoldError>
pub fn hold_str(hold: &dyn Hold<'a>, data: &str) -> Value<'a>
[src]
pub fn from_str(data: &str) -> Value<'a>
[src]
pub const fn from_u8(value: u8) -> Value<'a>
[src]
Constructs a new Value
from a u8
value.
pub const fn from_i8(value: i8) -> Value<'a>
[src]
Constructs a new Value
from an i8
value.
pub const fn from_u16(value: u16) -> Value<'a>
[src]
Constructs a new Value
from a u16
value.
pub const fn from_i16(value: i16) -> Value<'a>
[src]
Constructs a new Value
from an i16
value.
pub const fn from_u32(value: u32) -> Value<'a>
[src]
Constructs a new Value
from a u32
value.
pub const fn from_i32(value: i32) -> Value<'a>
[src]
Constructs a new Value
from an i32
value.
pub const fn from_u64(value: u64) -> Value<'a>
[src]
Constructs a new Value
from a u64
value.
pub const fn from_i64(value: i64) -> Value<'a>
[src]
Constructs a new Value
from an i64
value.
pub fn from_f16(value: f16) -> Value<'a>
[src]
Constructs a new Value
from an f16
value.
pub fn from_f32(value: f32) -> Value<'a>
[src]
Constructs a new Value
from an f32
value.
pub fn from_f64(value: f64) -> Value<'a>
[src]
Constructs a new Value
from an f64
value.
pub const fn from_usize(value: usize) -> Value<'a>
[src]
Constructs a new Value
from a usize
value.
pub const fn from_isize(value: isize) -> Value<'a>
[src]
Constructs a new Value
from an isize
value.
pub const fn from_bool(value: bool) -> Value<'a>
[src]
Constructs a new Value
from a bool
value.
pub const fn extant() -> Value<'a>
[src]
Constructs a new extant Value
.
pub const fn absent() -> Value<'a>
[src]
Constructs a new absent Value
.
pub fn is_defined(&self) -> bool
[src]
Returns true
if this Value
is not Absent
.
pub fn is_record(&self) -> bool
[src]
Returns true
if this Value
is a Record
.
pub fn is_data(&self) -> bool
[src]
Returns true
if this Value
is Data
.
pub fn is_text(&self) -> bool
[src]
Returns true
if this Value
is Text
.
pub fn is_num(&self) -> bool
[src]
Returns true
if this Value
is a Num
.
pub fn is_bool(&self) -> bool
[src]
Returns true
if this Value
is a Bool
.
pub fn is_extant(&self) -> bool
[src]
Returns true
if this Value
is Extant
.
pub fn is_absent(&self) -> bool
[src]
Returns true
if this Value
is Absent
.
pub fn as_record(&self) -> &Record<'a>
[src]
Downcasts this Value
reference to a Record
reference.
Panics
Panics if this Value
is not, in fact, a Record
.
pub fn as_mut_record(&mut self) -> &mut Record<'a>
[src]
Downcasts this Value
reference to a mutable Record
reference.
Panics
Panics if this Value
is not, in fact, a Record
.
pub fn as_data(&self) -> &Data<'a>
[src]
Downcasts this Value
reference to a Data
reference.
Panics
Panics if this Value
is not, in fact, Data
.
pub fn as_mut_data(&mut self) -> &mut Data<'a>
[src]
Downcasts this Value
reference to a mutable Data
reference.
Panics
Panics if this Value
is not, in fact, Data
.
pub fn as_text(&self) -> &Text<'a>
[src]
Downcasts this Value
reference to a Text
reference.
Panics
Panics if this Value
is not, in fact, Text
.
pub fn as_mut_text(&mut self) -> &mut Text<'a>
[src]
Downcasts this Value
reference to a mutable Text
reference.
Panics
Panics if this Value
is not, in fact, Text
.
pub fn as_num(&self) -> &Num<'a>
[src]
Downcasts this Value
reference to a Num
reference.
Panics
Panics if this Value
is not, in fact, a Num
.
pub fn as_mut_num(&mut self) -> &mut Num<'a>
[src]
Downcasts this Value
reference to a mutable Num
reference.
Panics
Panics if this Value
is not, in fact, a Num
.
pub fn as_bool(&self) -> &Bool
[src]
Downcasts this Value
reference to a Bool
reference.
Panics
Panics if this Value
is not, in fact, a Bool
.
pub fn as_mut_bool(&mut self) -> &mut Bool
[src]
Downcasts this Value
reference to a mutable Bool
reference.
Panics
Panics if this Value
is not, in fact, a Bool
.
pub fn as_extant(&self) -> &Extant
[src]
Downcasts this Value
reference to an Extant
reference.
Panics
Panics if this Value
is not, in fact, Extant
.
pub fn as_absent(&self) -> &Absent
[src]
Downcasts this Value
reference to an Absent
reference.
Panics
Panics if this Value
is not, in fact, Absent
.
pub unsafe fn as_record_unchecked(&self) -> &Record<'a>
[src]
Reinterprets this Value
reference as a Record
reference.
Safety
Does not verify that this Value
is, in fact, a Record
.
pub unsafe fn as_mut_record_unchecked(&mut self) -> &mut Record<'a>
[src]
Reinterprets this Value
reference as a mutable Record
reference.
Safety
Does not verify that this Value
is, in fact, a Record
.
pub unsafe fn as_data_unchecked(&self) -> &Data<'a>
[src]
Reinterprets this Value
reference as a Data
reference.
Safety
Does not verify that this Value
is, in fact, Data
.
pub unsafe fn as_mut_data_unchecked(&mut self) -> &mut Data<'a>
[src]
Reinterprets this Value
reference as a mutable Data
reference.
Safety
Does not verify that this Value
is, in fact, Data
.
pub unsafe fn as_text_unchecked(&self) -> &Text<'a>
[src]
Reinterprets this Value
reference as a Text
reference.
Safety
Does not verify that this Value
is, in fact, Text
.
pub unsafe fn as_mut_text_unchecked(&mut self) -> &mut Text<'a>
[src]
Reinterprets this Value
reference as a Text
reference.
Safety
Does not verify that this Value
is, in fact, Text
.
pub unsafe fn as_num_unchecked(&self) -> &Num<'a>
[src]
Reinterprets this Value
reference as a Num
reference.
Safety
Does not verify that this Value
is, in fact, a Num
.
pub unsafe fn as_mut_num_unchecked(&mut self) -> &mut Num<'a>
[src]
Reinterprets this Value
reference as a Num
reference.
Safety
Does not verify that this Value
is, in fact, a Num
.
pub unsafe fn as_bool_unchecked(&self) -> &Bool
[src]
Reinterprets this Value
reference as a Bool
reference.
Safety
Does not verify that this Value
is, in fact, a Bool
.
pub unsafe fn as_mut_bool_unchecked(&mut self) -> &mut Bool
[src]
Reinterprets this Value
reference as a Bool
reference.
Safety
Does not verify that this Value
is, in fact, a Bool
.
pub unsafe fn as_extant_unchecked(&self) -> &Extant
[src]
Reinterprets this Value
reference as an Extant
reference.
Safety
Does not verify that this Value
is, in fact, Extant
.
pub unsafe fn as_mut_extant_unchecked(&mut self) -> &mut Extant
[src]
Reinterprets this Value
reference as an Extant
reference.
Safety
Does not verify that this Value
is, in fact, Extant
.
pub unsafe fn as_absent_unchecked(&self) -> &Absent
[src]
Reinterprets this Value
reference as an Absent
reference.
Safety
Does not verify that this Value
is, in fact, Absent
.
pub unsafe fn as_mut_absent_unchecked(&mut self) -> &mut Absent
[src]
Reinterprets this Value
reference as an Absent
reference.
Safety
Does not verify that this Value
is, in fact, Absent
.
pub fn into_record(self) -> Record<'a>
[src]
pub fn into_data(self) -> Data<'a>
[src]
pub fn into_text(self) -> Text<'a>
[src]
pub fn into_num(self) -> Num<'a>
[src]
pub fn into_bool(self) -> Bool
[src]
pub fn into_extant(self) -> Extant
[src]
pub fn into_absent(self) -> Absent
[src]
pub unsafe fn into_record_unchecked(self) -> Record<'a>
[src]
pub unsafe fn into_data_unchecked(self) -> Data<'a>
[src]
pub unsafe fn into_text_unchecked(self) -> Text<'a>
[src]
pub unsafe fn into_num_unchecked(self) -> Num<'a>
[src]
pub unsafe fn into_bool_unchecked(self) -> Bool
[src]
pub unsafe fn into_extant_unchecked(self) -> Extant
[src]
pub unsafe fn into_absent_unchecked(self) -> Absent
[src]
pub fn into_item(self) -> Item<'a>
[src]
Upcasts this Value
to an Item
.
pub fn cast_as_record(&self) -> Option<&Record<'a>>
[src]
Downcasts this Value
reference to a typechecked Record
reference.
pub fn cast_as_mut_record(&mut self) -> Option<&mut Record<'a>>
[src]
Downcasts this Value
reference to a typechecked, mutable Record
reference.
pub fn cast_as_data(&self) -> Option<&Data<'a>>
[src]
Downcasts this Value
reference to a typechecked Data
reference.
pub fn cast_as_mut_data(&mut self) -> Option<&mut Data<'a>>
[src]
Downcasts this Value
reference to a typechecked, mutable Data
reference.
pub fn cast_as_text(&self) -> Option<&Text<'a>>
[src]
Downcasts this Value
reference to a typechecked Text
reference.
pub fn cast_as_mut_text(&mut self) -> Option<&mut Text<'a>>
[src]
Downcasts this Value
reference to a typechecked, mutable Text
reference.
pub fn cast_as_num(&self) -> Option<&Num<'a>>
[src]
Downcasts this Value
reference to a typechecked Num
reference.
pub fn cast_as_mut_num(&mut self) -> Option<&mut Num<'a>>
[src]
Downcasts this Value
reference to a typechecked, mutable Num
reference.
pub fn cast_as_bool(&self) -> Option<&Bool>
[src]
Downcasts this Value
reference to a typechecked Bool
reference.
pub fn cast_as_mut_bool(&mut self) -> Option<&mut Bool>
[src]
Downcasts this Value
reference to a typechecked, mutable Bool
reference.
pub fn cast_as_extant(&self) -> Option<&Extant>
[src]
Downcasts this Value
reference to a typechecked Extant
reference.
pub fn cast_as_absent(&self) -> Option<&Absent>
[src]
Downcasts this Value
reference to a typechecked Absent
reference.
pub fn cast_into_record(self) -> Option<Record<'a>>
[src]
Downcasts this Value
to a typechecked Record
.
pub fn cast_into_data(self) -> Option<Data<'a>>
[src]
Downcasts this Value
to typechecked Data
.
pub fn cast_into_text(self) -> Option<Text<'a>>
[src]
Downcasts this Value
to typechecked Text
.
pub fn cast_into_num(self) -> Option<Num<'a>>
[src]
Downcasts this Value
to a typechecked Num
.
pub fn cast_into_bool(self) -> Option<Bool>
[src]
Downcasts this Value
to a typechecked Bool
.
pub fn cast_into_extant(self) -> Option<Extant>
[src]
Downcasts this Value
to typechecked Extant
.
pub fn cast_into_absent(self) -> Option<Absent>
[src]
Downcasts this Value
to typechecked Absent
.
Trait Implementations
impl<'a> PartialEq<Value<'a>> for Value<'a>
[src]
impl<'a> Eq for Value<'a>
[src]
impl<'a> Ord for Value<'a>
[src]
fn cmp(&self, other: &Value<'a>) -> Ordering
[src]
default fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
default fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
default fn clamp(self, min: Self, max: Self) -> Self
[src]
clamp
)Restrict a value to a certain interval. Read more
impl<'a> PartialOrd<Value<'a>> for Value<'a>
[src]
fn partial_cmp(&self, _that: &Value<'a>) -> Option<Ordering>
[src]
fn lt(&self, _that: &Value<'a>) -> bool
[src]
fn le(&self, _that: &Value<'a>) -> bool
[src]
fn ge(&self, _that: &Value<'a>) -> bool
[src]
fn gt(&self, _that: &Value<'a>) -> bool
[src]
impl<'a> From<Value<'a>> for Item<'a>
[src]
impl<'a> From<Record<'a>> for Value<'a>
[src]
impl<'a> From<Data<'a>> for Value<'a>
[src]
impl<'a> From<Text<'a>> for Value<'a>
[src]
impl<'a> From<Num<'a>> for Value<'a>
[src]
impl<'a> From<Bool> for Value<'a>
[src]
impl<'a> From<Extant> for Value<'a>
[src]
impl<'a> From<Absent> for Value<'a>
[src]
impl<'a> From<u8> for Value<'a>
[src]
impl<'a> From<i8> for Value<'a>
[src]
impl<'a> From<u16> for Value<'a>
[src]
impl<'a> From<i16> for Value<'a>
[src]
impl<'a> From<u32> for Value<'a>
[src]
impl<'a> From<i32> for Value<'a>
[src]
impl<'a> From<u64> for Value<'a>
[src]
impl<'a> From<i64> for Value<'a>
[src]
impl<'a> From<f16> for Value<'a>
[src]
impl<'a> From<f32> for Value<'a>
[src]
impl<'a> From<f64> for Value<'a>
[src]
impl<'a> From<usize> for Value<'a>
[src]
impl<'a> From<isize> for Value<'a>
[src]
impl<'a> From<bool> for Value<'a>
[src]
impl<'a> Debug for Value<'a>
[src]
impl<'a> Drop for Value<'a>
[src]
impl<'a> Hash for Value<'a>
[src]
fn hash<H: Hasher>(&self, hasher: &mut H)
[src]
default fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<'a> Clone for Value<'a>
[src]
fn clone(&self) -> Value<'a>
[src]
default fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'a> AsMut<Value<'a>> for Record<'a>
[src]
impl<'a> AsMut<Value<'a>> for Data<'a>
[src]
impl<'a> AsMut<Value<'a>> for Text<'a>
[src]
impl<'a> AsMut<Value<'a>> for Num<'a>
[src]
impl<'a> AsMut<Value<'a>> for Bool
[src]
impl<'a> AsMut<Value<'a>> for Extant
[src]
impl<'a> AsMut<Value<'a>> for Absent
[src]
impl<'a> AsRef<Value<'a>> for Record<'a>
[src]
impl<'a> AsRef<Value<'a>> for Data<'a>
[src]
impl<'a> AsRef<Value<'a>> for Text<'a>
[src]
impl<'a> AsRef<Value<'a>> for Num<'a>
[src]
impl<'a> AsRef<Value<'a>> for Bool
[src]
impl<'a> AsRef<Value<'a>> for Extant
[src]
impl<'a> AsRef<Value<'a>> for Absent
[src]
impl<'a> Default for Value<'a>
[src]
impl<'a, 'b> Stow<'b, Value<'b>> for Value<'a>
[src]
unsafe fn stow(
src: *mut Value<'a>,
dst: *mut Value<'b>,
hold: &dyn Hold<'b>
) -> Result<(), HoldError>
[src]
src: *mut Value<'a>,
dst: *mut Value<'b>,
hold: &dyn Hold<'b>
) -> Result<(), HoldError>
unsafe fn unstow(src: *mut Value<'a>, dst: *mut Value<'b>)
[src]
impl<'a> TryClone for Value<'a>
[src]
impl<'a, 'b> CloneIntoHold<'a, Value<'a>> for Value<'b>
[src]
fn try_clone_into_hold(
&self,
hold: &dyn Hold<'a>
) -> Result<Value<'a>, HoldError>
[src]
&self,
hold: &dyn Hold<'a>
) -> Result<Value<'a>, HoldError>
default fn clone_into_hold(&self, hold: &dyn Hold<'a>) -> T
[src]
Returns a clone of self
allocated in hold
. Read more
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<'b, S, T> StowFrom for T where
S: Stow<'b, T>,
[src]
S: Stow<'b, T>,
default fn try_stow_from(
src: S,
hold: &dyn Hold<'b>
) -> Result<T, (S, HoldError)>
[src]
src: S,
hold: &dyn Hold<'b>
) -> Result<T, (S, HoldError)>
default fn stow_from(value: T, hold: &dyn Hold<'b>) -> Self
[src]
impl<'b, S, T> StowInto for S where
T: StowFrom<'b, S>,
[src]
T: StowFrom<'b, S>,