[][src]Struct swim_structure::item::Item

#[repr(C)]
pub struct Item<'a> { /* fields omitted */ }

Union of Field and Value representing a member of a Record.

Methods

impl<'a> Item<'a>[src]

pub fn attr(key: Text<'a>, val: Value<'a>) -> Item<'a>[src]

pub fn slot(key: Value<'a>, val: Value<'a>) -> Item<'a>[src]

pub const fn from_u8(value: u8) -> Item<'a>[src]

Constructs a new Item from a u8 value.

pub const fn from_i8(value: i8) -> Item<'a>[src]

Constructs a new Item from an i8 value.

pub const fn from_u16(value: u16) -> Item<'a>[src]

Constructs a new Item from a u16 value.

pub const fn from_i16(value: i16) -> Item<'a>[src]

Constructs a new Item from an i16 value.

pub const fn from_u32(value: u32) -> Item<'a>[src]

Constructs a new Item from a u32 value.

pub const fn from_i32(value: i32) -> Item<'a>[src]

Constructs a new Item from an i32 value.

pub const fn from_u64(value: u64) -> Item<'a>[src]

Constructs a new Item from a u64 value.

pub const fn from_i64(value: i64) -> Item<'a>[src]

Constructs a new Item from an i64 value.

pub fn from_f16(value: f16) -> Item<'a>[src]

Constructs a new Item from an f16 value.

pub fn from_f32(value: f32) -> Item<'a>[src]

Constructs a new Item from an f32 value.

pub fn from_f64(value: f64) -> Item<'a>[src]

Constructs a new Item from an f64 value.

pub const fn from_usize(value: usize) -> Item<'a>[src]

Constructs a new Item from a usize value.

pub const fn from_isize(value: isize) -> Item<'a>[src]

Constructs a new Item from an isize value.

pub const fn from_bool(value: bool) -> Item<'a>[src]

Constructs a new Item from a bool value.

pub const fn extant() -> Item<'a>[src]

Constructs a new extant Item.

pub const fn absent() -> Item<'a>[src]

Constructs a new absent Item.

pub fn get_key(&self) -> &Option<Value<'a>>[src]

Returns a reference to this Item's optional key.

pub fn get_key_mut(&mut self) -> &mut Option<Value<'a>>[src]

Returns a mutable reference to this Item's optional key.

pub unsafe fn get_key_unchecked(&self) -> &Value<'a>[src]

Returns a reference to this Item's key.

Safety

Does not verify that this Item's key is defined.

pub unsafe fn get_key_unchecked_mut(&mut self) -> &mut Value<'a>[src]

Returns a mutable reference to this Item's key.

Safety

Does not verify that this Item's key is defined.

pub fn get_val(&self) -> &Value<'a>[src]

Returns a reference to this Item's value.

pub fn get_val_mut(&mut self) -> &mut Value<'a>[src]

Returns a mutable reference to this Item's value.

pub fn get_key_val(&self) -> (&Option<Value<'a>>, &Value<'a>)[src]

Returns a pair of references to this Item's optional key and value.

pub fn get_key_val_mut(&mut self) -> (&mut Option<Value<'a>>, &mut Value<'a>)[src]

Returns a pair of mutable references to this Item's optional key and value.

pub fn into_key(self) -> Option<Value<'a>>[src]

Returns this Item's key, dropping its value.

pub fn into_val(self) -> Value<'a>[src]

Returns this Item's value, dropping its optional key.

pub fn into_key_val(self) -> (Option<Value<'a>>, Value<'a>)[src]

Returns this Item's optional key and value as a pair.

pub fn is_defined(&self) -> bool[src]

Returns true if this Item is not Absent.

pub fn is_field(&self) -> bool[src]

Returns true if this Item is a Field.

pub fn is_attr(&self) -> bool[src]

Returns true if this Item is an Attr.

pub fn is_slot(&self) -> bool[src]

Returns true if this Item is a Slot.

pub fn is_value(&self) -> bool[src]

Returns true if this Item is a Value.

pub fn is_record(&self) -> bool[src]

Returns true if this Item is a Record.

pub fn is_data(&self) -> bool[src]

Returns true if this Item is Data.

pub fn is_text(&self) -> bool[src]

Returns true if this Item is Text.

pub fn is_num(&self) -> bool[src]

Returns true if this Item is a Num.

pub fn is_bool(&self) -> bool[src]

Returns true if this Item is a Bool.

pub fn is_extant(&self) -> bool[src]

Returns true if this Item is Extant.

pub fn is_absent(&self) -> bool[src]

Returns true if this Item is Absent.

pub fn as_field(&self) -> &Field<'a>[src]

Downcasts this Item reference to a Field reference.

Panics

Panics if this Item is not, in fact, a Field.

pub fn as_mut_field(&mut self) -> &mut Field<'a>[src]

Downcasts this Item reference to a mutable Field reference.

Panics

Panics if this Item is not, in fact, a Field.

pub fn as_attr(&self) -> &Attr<'a>[src]

Downcasts this Item reference to an Attr reference.

Panics

Panics if this Item is not, in fact, an Attr.

pub fn as_mut_attr(&mut self) -> &mut Attr<'a>[src]

Downcasts this Item reference to a mutable Attr reference.

Panics

Panics if this Item is not, in fact, an Attr.

pub fn as_slot(&self) -> &Slot<'a>[src]

Downcasts this Item reference to a Slot reference.

Panics

Panics if this Item is not, in fact, a Slot.

pub fn as_mut_slot(&mut self) -> &mut Slot<'a>[src]

Downcasts this Item reference to a mutable Slot reference.

Panics

Panics if this Item is not, in fact, a Slot.

pub fn as_value(&self) -> &Value<'a>[src]

Downcasts this Item reference to a Value reference.

Panics

Panics if this Item is not, in fact, a Value.

pub fn as_mut_value(&mut self) -> &mut Value<'a>[src]

Downcasts this Item reference to a mutable Value reference.

Panics

Panics if this Item is not, in fact, a Value.

pub fn as_record(&self) -> &Record<'a>[src]

Downcasts this Item reference to a Record reference.

Panics

Panics if this Item is not, in fact, a Record.

pub fn as_mut_record(&mut self) -> &mut Record<'a>[src]

Downcasts this Item reference to a mutable Record reference.

Panics

Panics if this Item is not, in fact, a Record.

pub fn as_data(&self) -> &Data<'a>[src]

Downcasts this Item reference to a Data reference.

Panics

Panics if this Item is not, in fact, Data.

pub fn as_mut_data(&mut self) -> &mut Data<'a>[src]

Downcasts this Item reference to a mutable Data reference.

Panics

Panics if this Item is not, in fact, Data.

pub fn as_text(&self) -> &Text<'a>[src]

Downcasts this Item reference to a Text reference.

Panics

Panics if this Item is not, in fact, Text.

pub fn as_mut_text(&mut self) -> &mut Text<'a>[src]

Downcasts this Item reference to a mutable Text reference.

Panics

Panics if this Item is not, in fact, Text.

pub fn as_num(&self) -> &Num<'a>[src]

Downcasts this Item reference to a Num reference.

Panics

Panics if this Item is not, in fact, a Num.

pub fn as_mut_num(&mut self) -> &mut Num<'a>[src]

Downcasts this Item reference to a mutable Num reference.

Panics

Panics if this Item is not, in fact, a Num.

pub fn as_bool(&self) -> &Bool[src]

Downcasts this Item reference to a Bool reference.

Panics

Panics if this Item is not, in fact, a Bool.

pub fn as_mut_bool(&mut self) -> &mut Bool[src]

Downcasts this Item reference to a mutable Bool reference.

Panics

Panics if this Item is not, in fact, a Bool.

pub fn as_extant(&self) -> &Extant[src]

Downcasts this Item reference to an Extant reference.

Panics

Panics if this Item is not, in fact, Extant.

pub fn as_absent(&self) -> &Absent[src]

Downcasts this Item reference to an Absent reference.

Panics

Panics if this Item is not, in fact, Absent.

pub unsafe fn as_field_unchecked(&self) -> &Field<'a>[src]

Reinterprets this Item reference as an Field reference.

Safety

Does not verify that this Item is, in fact, an Field.

pub unsafe fn as_mut_field_unchecked(&mut self) -> &mut Field<'a>[src]

Reinterprets this Item reference as a mutable Field reference.

Safety

Does not verify that this Item is, in fact, an Field.

pub unsafe fn as_attr_unchecked(&self) -> &Attr<'a>[src]

Reinterprets this Item reference as an Attr reference.

Safety

Does not verify that this Item is, in fact, an Attr.

pub unsafe fn as_mut_attr_unchecked(&mut self) -> &mut Attr<'a>[src]

Reinterprets this Item reference as a mutable Attr reference.

Safety

Does not verify that this Item is, in fact, an Attr.

pub unsafe fn as_slot_unchecked(&self) -> &Slot<'a>[src]

Reinterprets this Item reference as a Slot reference.

Safety

Does not verify that this Item is, in fact, a Slot.

pub unsafe fn as_mut_slot_unchecked(&mut self) -> &mut Slot<'a>[src]

Reinterprets this Item reference as a mutable Slot reference.

Safety

Does not verify that this Item is, in fact, a Slot.

pub unsafe fn as_record_unchecked(&self) -> &Record<'a>[src]

Reinterprets this Item reference as a Record reference.

Safety

Does not verify that this Item is, in fact, a Record.

pub unsafe fn as_mut_record_unchecked(&mut self) -> &mut Record<'a>[src]

Reinterprets this Item reference as a mutable Record reference.

Safety

Does not verify that this Item is, in fact, a Record.

pub unsafe fn as_data_unchecked(&self) -> &Data<'a>[src]

Reinterprets this Item reference as a Data reference.

Safety

Does not verify that this Item is, in fact, Data.

pub unsafe fn as_mut_data_unchecked(&mut self) -> &mut Data<'a>[src]

Reinterprets this Item reference as a mutable Data reference.

Safety

Does not verify that this Item is, in fact, Data.

pub unsafe fn as_text_unchecked(&self) -> &Text<'a>[src]

Reinterprets this Item reference as a Text reference.

Safety

Does not verify that this Item is, in fact, Text.

pub unsafe fn as_mut_text_unchecked(&mut self) -> &mut Text<'a>[src]

Reinterprets this Item reference as a Text reference.

Safety

Does not verify that this Item is, in fact, Text.

pub unsafe fn as_num_unchecked(&self) -> &Num<'a>[src]

Reinterprets this Item reference as a Num reference.

Safety

Does not verify that this Item is, in fact, a Num.

pub unsafe fn as_mut_num_unchecked(&mut self) -> &mut Num<'a>[src]

Reinterprets this Item reference as a Num reference.

Safety

Does not verify that this Item is, in fact, a Num.

pub unsafe fn as_bool_unchecked(&self) -> &Bool[src]

Reinterprets this Item reference as a Bool reference.

Safety

Does not verify that this Item is, in fact, a Bool.

pub unsafe fn as_mut_bool_unchecked(&mut self) -> &mut Bool[src]

Reinterprets this Item reference as a Bool reference.

Safety

Does not verify that this Item is, in fact, a Bool.

pub unsafe fn as_extant_unchecked(&self) -> &Extant[src]

Reinterprets this Item reference as an Extant reference.

Safety

Does not verify that this Item is, in fact, Extant.

pub unsafe fn as_absent_unchecked(&self) -> &Absent[src]

Reinterprets this Item reference as an Absent reference.

Safety

Does not verify that this Item is, in fact, Absent.

pub fn into_field(self) -> Field<'a>[src]

Downcasts this Item to a Field.

Panics

Panics if this Item is not, in fact, a Field.

pub fn into_attr(self) -> Attr<'a>[src]

Downcasts this Item to an Attr.

Panics

Panics if this Item is not, in fact, an Attr.

pub fn into_slot(self) -> Slot<'a>[src]

Downcasts this Item to a Slot.

Panics

Panics if this Item is not, in fact, a Slot.

pub fn into_value(self) -> Value<'a>[src]

Downcasts this Item to a Value.

Panics

Panics if this Item is not, in fact, a Value.

pub fn into_record(self) -> Record<'a>[src]

Downcasts this Item to a Record.

Panics

Panics if this Item is not, in fact, a Record.

pub fn into_data(self) -> Data<'a>[src]

Downcasts this Item to Data.

Panics

Panics if this Item is not, in fact, Data.

pub fn into_text(self) -> Text<'a>[src]

Downcasts this Item to Text.

Panics

Panics if this Item is not, in fact, Text.

pub fn into_num(self) -> Num<'a>[src]

Downcasts this Item to a Num.

Panics

Panics if this Item is not, in fact, a Num.

pub fn into_bool(self) -> Bool[src]

Downcasts this Item to a Bool.

Panics

Panics if this Item is not, in fact, a Bool.

pub fn into_extant(self) -> Extant[src]

Downcasts this Item to Extant.

Panics

Panics if this Item is not, in fact, Extant.

pub fn into_absent(self) -> Absent[src]

Downcasts this Item to Absent.

Panics

Panics if this Item is not, in fact, Absent.

pub unsafe fn into_field_unchecked(self) -> Field<'a>[src]

Reinterprets this Item as a Field.

Safety

Does not verify that this Item is, in fact, a Field.

pub unsafe fn into_attr_unchecked(self) -> Attr<'a>[src]

Reinterprets this Item as an Attr.

Safety

Does not verify that this Item is, in fact, an Attr.

pub unsafe fn into_slot_unchecked(self) -> Slot<'a>[src]

Reinterprets this Item as a Slot.

Safety

Does not verify that this Item is, in fact, a Slot.

pub unsafe fn into_record_unchecked(self) -> Record<'a>[src]

Reinterprets this Value as a Record.

Safety

Does not verify that this Value is, in fact, a Record.

pub unsafe fn into_data_unchecked(self) -> Data<'a>[src]

Reinterprets this Value as Data.

Safety

Does not verify that this Value is, in fact, Data.

pub unsafe fn into_text_unchecked(self) -> Text<'a>[src]

Reinterprets this Value as Text.

Safety

Does not verify that this Value is, in fact, Text.

pub unsafe fn into_num_unchecked(self) -> Num<'a>[src]

Reinterprets this Value as a Num.

Safety

Does not verify that this Value is, in fact, a Num.

pub unsafe fn into_bool_unchecked(self) -> Bool[src]

Reinterprets this Value as a Bool.

Safety

Does not verify that this Value is, in fact, a Bool.

pub unsafe fn into_extant_unchecked(self) -> Extant[src]

Reinterprets this Value as Extant.

Safety

Does not verify that this Value is, in fact, Extant.

pub unsafe fn into_absent_unchecked(self) -> Absent[src]

Reinterprets this Value as Absent.

Safety

Does not verify that this Value is, in fact, Absent.

pub fn cast_as_field(&self) -> Option<&Field<'a>>[src]

Downcasts this Item reference to a typechecked Field reference.

pub fn cast_as_mut_field(&mut self) -> Option<&mut Field<'a>>[src]

Downcasts this Item reference to a typechecked, mutable Field reference.

pub fn cast_as_attr(&self) -> Option<&Attr<'a>>[src]

Downcasts this Item reference to a typechecked Attr reference.

pub fn cast_as_mut_attr(&mut self) -> Option<&mut Attr<'a>>[src]

Downcasts this Item reference to a typechecked, mutable Attr reference.

pub fn cast_as_slot(&self) -> Option<&Slot<'a>>[src]

Downcasts this Item reference to a typechecked Slot reference.

pub fn cast_as_mut_slot(&mut self) -> Option<&mut Slot<'a>>[src]

Downcasts this Item reference to a typechecked, mutable Slot reference.

pub fn cast_as_value(&self) -> Option<&Value<'a>>[src]

Downcasts this Item reference to a typechecked Value reference.

pub fn cast_as_mut_value(&mut self) -> Option<&mut Value<'a>>[src]

Downcasts this Item reference to a typechecked, mutable Value reference.

pub fn cast_as_record(&self) -> Option<&Record<'a>>[src]

Downcasts this Item reference to a typechecked Record reference.

pub fn cast_as_mut_record(&mut self) -> Option<&mut Record<'a>>[src]

Downcasts this Item reference to a typechecked, mutable Record reference.

pub fn cast_as_data(&self) -> Option<&Data<'a>>[src]

Downcasts this Item reference to a typechecked Data reference.

pub fn cast_as_mut_data(&mut self) -> Option<&mut Data<'a>>[src]

Downcasts this Item reference to a typechecked, mutable Data reference.

pub fn cast_as_text(&self) -> Option<&Text<'a>>[src]

Downcasts this Item reference to a typechecked Text reference.

pub fn cast_as_mut_text(&mut self) -> Option<&mut Text<'a>>[src]

Downcasts this Item reference to a typechecked, mutable Text reference.

pub fn cast_as_num(&self) -> Option<&Num<'a>>[src]

Downcasts this Item reference to a typechecked Num reference.

pub fn cast_as_mut_num(&mut self) -> Option<&mut Num<'a>>[src]

Downcasts this Item reference to a typechecked, mutable Num reference.

pub fn cast_as_bool(&self) -> Option<&Bool>[src]

Downcasts this Item reference to a typechecked Bool reference.

pub fn cast_as_mut_bool(&mut self) -> Option<&mut Bool>[src]

Downcasts this Item reference to a typechecked, mutable Bool reference.

pub fn cast_as_extant(&self) -> Option<&Extant>[src]

Downcasts this Item reference to a typechecked Extant reference.

pub fn cast_as_absent(&self) -> Option<&Absent>[src]

Downcasts this Item reference to a typechecked Absent reference.

pub fn cast_into_field(self) -> Option<Field<'a>>[src]

Downcasts this Item to a typechecked Field.

pub fn cast_into_attr(self) -> Option<Attr<'a>>[src]

Downcasts this Item to a typechecked Attr.

pub fn cast_into_slot(self) -> Option<Slot<'a>>[src]

Downcasts this Item to a typechecked Slot.

pub fn cast_into_value(self) -> Option<Value<'a>>[src]

Downcasts this Item to a typechecked Value.

pub fn cast_into_record(self) -> Option<Record<'a>>[src]

Downcasts this Item to a typechecked Record.

pub fn cast_into_data(self) -> Option<Data<'a>>[src]

Downcasts this Item to typechecked Data.

pub fn cast_into_text(self) -> Option<Text<'a>>[src]

Downcasts this Item to typechecked Text.

pub fn cast_into_num(self) -> Option<Num<'a>>[src]

Downcasts this Item to a typechecked Num.

pub fn cast_into_bool(self) -> Option<Bool>[src]

Downcasts this Item to a typechecked Bool.

pub fn cast_into_extant(self) -> Option<Extant>[src]

Downcasts this Item to typechecked Extant.

pub fn cast_into_absent(self) -> Option<Absent>[src]

Downcasts this Item to typechecked Absent.

Trait Implementations

impl<'a> PartialEq<Item<'a>> for Item<'a>[src]

impl<'a> Eq for Item<'a>[src]

impl<'a> Ord for Item<'a>[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]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl<'a> PartialOrd<Item<'a>> for Item<'a>[src]

impl<'a> From<Field<'a>> for Item<'a>[src]

impl<'a> From<Attr<'a>> for Item<'a>[src]

impl<'a> From<Slot<'a>> for Item<'a>[src]

impl<'a> From<Value<'a>> for Item<'a>[src]

impl<'a> From<Record<'a>> for Item<'a>[src]

impl<'a> From<Data<'a>> for Item<'a>[src]

impl<'a> From<Text<'a>> for Item<'a>[src]

impl<'a> From<Num<'a>> for Item<'a>[src]

impl<'a> From<Bool> for Item<'a>[src]

impl<'a> From<Extant> for Item<'a>[src]

impl<'a> From<Absent> for Item<'a>[src]

impl<'a> From<u8> for Item<'a>[src]

impl<'a> From<i8> for Item<'a>[src]

impl<'a> From<u16> for Item<'a>[src]

impl<'a> From<i16> for Item<'a>[src]

impl<'a> From<u32> for Item<'a>[src]

impl<'a> From<i32> for Item<'a>[src]

impl<'a> From<u64> for Item<'a>[src]

impl<'a> From<i64> for Item<'a>[src]

impl<'a> From<f16> for Item<'a>[src]

impl<'a> From<f32> for Item<'a>[src]

impl<'a> From<f64> for Item<'a>[src]

impl<'a> From<usize> for Item<'a>[src]

impl<'a> From<isize> for Item<'a>[src]

impl<'a> From<bool> for Item<'a>[src]

impl<'a> Debug for Item<'a>[src]

impl<'a> Hash for Item<'a>[src]

default fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl<'a> Clone for Item<'a>[src]

default fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<'a> AsMut<Item<'a>> for Field<'a>[src]

impl<'a> AsMut<Item<'a>> for Attr<'a>[src]

impl<'a> AsMut<Item<'a>> for Slot<'a>[src]

impl<'a> AsRef<Item<'a>> for Field<'a>[src]

impl<'a> AsRef<Item<'a>> for Attr<'a>[src]

impl<'a> AsRef<Item<'a>> for Slot<'a>[src]

impl<'a> Default for Item<'a>[src]

impl<'a, 'b> Stow<'b, Item<'b>> for Item<'a>[src]

impl<'a> TryClone for Item<'a>[src]

impl<'a, 'b> CloneIntoHold<'a, Item<'a>> for Item<'b>[src]

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

impl<'a> Send for Item<'a>

impl<'a> Sync for Item<'a>

Blanket Implementations

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<'b, S, T> StowFrom for T where
    S: Stow<'b, T>, 
[src]

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]

default fn stow_into(self, hold: &dyn Hold<'b>) -> T[src]