Element

Struct Element 

Source
pub struct Element { /* private fields */ }

Implementations§

Source§

impl Element

Source

pub fn string_name(&self) -> String

Source

pub fn name(&self) -> Name

Source

pub fn has_element(&self, name: &str) -> bool

Source

pub fn has_named_element(&self, named: &Name) -> bool

Source

pub fn num_values(&self) -> usize

Source

pub fn num_elements(&self) -> usize

Source

pub fn get_element(&self, name: &str) -> Option<Element>

Source

pub fn get_named_element(&self, named_element: &Name) -> Option<Element>

Source

pub fn get_element_at(&self, index: usize) -> Option<Element>

Source

pub fn append_element(&mut self) -> Result<Element, Error>

Source

pub fn append<V: SetValue>(&mut self, value: V) -> Result<(), Error>

Source

pub fn get_at<V: GetValue>(&self, index: usize) -> Option<V>

Source

pub fn set_at<V: SetValue>( &mut self, index: usize, value: V, ) -> Result<(), Error>

Source

pub fn set<V: SetValue>(&mut self, name: &str, value: V) -> Result<(), Error>

Source

pub fn set_named<V: SetValue>( &mut self, name: &Name, value: V, ) -> Result<(), Error>

Source

pub fn element_value<V: GetValue>(&self, element: &str) -> Option<V>

Source

pub fn value<V: GetValue>(&self) -> Option<V>

Source

pub fn values<V: GetValue>(&self) -> Values<'_, V>

Source

pub fn elements(&self) -> Elements<'_>

Trait Implementations§

Source§

impl GetValue for Element

Source§

fn get_at(element: &Element, index: usize) -> Option<Self>

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> 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, 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.