ParsedTuple

Enum ParsedTuple 

Source
pub enum ParsedTuple {
    Unit,
    Single(Box<ParsedValue>),
    Multiple(Box<[ParsedValue]>),
}
Expand description

A parsed tuple.

Variants§

§

Unit

§

Single(Box<ParsedValue>)

§

Multiple(Box<[ParsedValue]>)

Trait Implementations§

Source§

impl Clone for ParsedTuple

Source§

fn clone(&self) -> ParsedTuple

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Compound<ParsedValue, ParsedText, ParsedDictionary, ParsedList, ParsedCompound, ParsedTuple, ParsedTaggedValue> for ParsedCompound

Source§

type ElementIterator<'b> = ElementIterator<'b>

Iterator over the elements in a compound.
Source§

fn len(&self) -> usize

Number of elements in this compound.
Source§

fn get(&self, _index: usize) -> Option<Element<&ParsedValue>>

Get the element at an index.
Source§

fn iter(&self) -> Self::ElementIterator<'_>

Iterate over the elements in this compound.
Source§

impl Dictionary<ParsedValue, ParsedText, ParsedDictionary, ParsedList, ParsedCompound, ParsedTuple, ParsedTaggedValue> for ParsedDictionary

Source§

type EntryIterator<'b> = EntryIterator<'b>

Source§

fn len(&self) -> usize

Number of entries in this dictionary.
Source§

fn is_empty(&self) -> bool

Check if this dictionary is empty.
Source§

fn get(&self, key: &str) -> Option<&ParsedValue>

Get the entry at an index.
Source§

fn get_mut(&mut self, key: &str) -> Option<&mut ParsedValue>

Get the entry at an index.
Source§

fn iter(&self) -> Self::EntryIterator<'_>

Iterate over the entries in this dictionary.
Source§

impl List<ParsedValue, ParsedText, ParsedDictionary, ParsedList, ParsedCompound, ParsedTuple, ParsedTaggedValue> for ParsedList

Source§

type ListIterator<'b> = Iter<'b, ParsedValue>

Iterator over the entries in a table.
Source§

fn len(&self) -> usize

Number of entries in this list.
Source§

fn is_empty(&self) -> bool

Check if this list is empty.
Source§

fn get_element(&self, index: usize) -> Option<&ParsedValue>

Get the entry at index.
Source§

fn iter(&self) -> Self::ListIterator<'_>

Iterate over the entries in this list.
Source§

impl Tagged<ParsedValue, ParsedText, ParsedDictionary, ParsedList, ParsedCompound, ParsedTuple, ParsedTaggedValue> for ParsedTaggedValue

Source§

type AttributeIterator<'b> = AttributeIterator<'b>

Iterator over tag attributes.
Source§

fn name(&self) -> &str

Name of the tag.
Source§

fn has_attributes(&self) -> bool

Check if this tag has attributes.
Source§

fn get_attribute_by(&self, key: &str) -> Option<AttributeValue<'_>>

Get the attribute by key.
Source§

fn get_attribute_at(&self, index: usize) -> Option<Attribute<'_>>

Get the attribute by index.
Source§

fn iter_attributes(&self) -> Self::AttributeIterator<'_>

Iterate over the attributes of this tag.
Source§

fn get(&self) -> &ParsedValue

Get the tagged value.
Source§

impl Text<ParsedValue, ParsedText, ParsedDictionary, ParsedList, ParsedCompound, ParsedTuple, ParsedTaggedValue> for ParsedText

Source§

fn as_str(&self) -> &str

Source§

impl Tuple<ParsedValue, ParsedText, ParsedDictionary, ParsedList, ParsedCompound, ParsedTuple, ParsedTaggedValue> for ParsedTuple

Source§

type TupleIterator<'b> = TupleIterator<'b>

Source§

fn len(&self) -> usize

Number of elements in the tuple.
Source§

fn is_empty(&self) -> bool

Check if this tuple is empty.
Source§

fn get(&self, index: usize) -> Option<&ParsedValue>

Get the element at an index.
Source§

fn iter(&self) -> Self::TupleIterator<'_>

Iterate over the elements in this tuple.
Source§

impl Value<ParsedValue, ParsedText, ParsedDictionary, ParsedList, ParsedCompound, ParsedTuple, ParsedTaggedValue> for ParsedValue

Source§

fn is_text(&self) -> bool

Check if this is text.
Source§

fn is_tagged(&self) -> bool

Check if this is a tag.
Source§

fn is_tuple(&self) -> bool

Check if this is a tuple.
Source§

fn is_dictionary(&self) -> bool

Check if this is a dictionary.
Source§

fn is_list(&self) -> bool

Check if this is a table.
Source§

fn is_compound(&self) -> bool

Check if this is a compound.
Source§

fn is_nil(&self) -> bool

Check if this is nil.
Source§

fn as_text(&self) -> Option<&ParsedText>

Get as text.
Source§

fn as_tagged(&self) -> Option<&ParsedTaggedValue>

Get as a tagged value.
Source§

fn as_tuple(&self) -> Option<&ParsedTuple>

Get as a tuple.
Source§

fn as_dictionary(&self) -> Option<&ParsedDictionary>

Get as a dictionary.
Source§

fn as_list(&self) -> Option<&ParsedList>

Get as a table.
Source§

fn as_compound(&self) -> Option<&ParsedCompound>

Get as a compound.
Source§

fn as_mut_text(&mut self) -> Option<&mut ParsedText>

Get as text.
Source§

fn as_mut_tagged(&mut self) -> Option<&mut ParsedTaggedValue>

Get as a tagged value.
Source§

fn as_mut_tuple(&mut self) -> Option<&mut ParsedTuple>

Get as a tuple.
Source§

fn as_mut_dictionary(&mut self) -> Option<&mut ParsedDictionary>

Get as a dictionary.
Source§

fn as_mut_list(&mut self) -> Option<&mut ParsedList>

Get as a table.
Source§

fn as_mut_compound(&mut self) -> Option<&mut ParsedCompound>

Get as a compound.
Source§

fn iter_as_tuple<'b>(&'b self) -> impl Iterator<Item = &'b ParsedValue>
where Self: 'b,

Iterate as a tuple. Read more
Source§

fn len_as_tuple(&self) -> usize

Get the length of this value as a tuple. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.