AttrParserRef

Struct AttrParserRef 

Source
pub struct AttrParserRef<'a> {
    pub attrs: &'a [(Cow<'a, str>, Cow<'a, str>)],
    pub errors: Vec<BinaryError>,
}

Fields§

§attrs: &'a [(Cow<'a, str>, Cow<'a, str>)]§errors: Vec<BinaryError>

Implementations§

Source§

impl<'a> AttrParserRef<'a>

Source

pub fn new(node: &'a NodeRef<'a>) -> Self

Source

pub fn ok(&self) -> bool

Source

pub fn finish(&self) -> Result<()>

Source

pub fn optional_string(&mut self, key: &str) -> Option<&'a str>

Source

pub fn string(&mut self, key: &str) -> String

Source

pub fn optional_jid(&mut self, key: &str) -> Option<Jid>

Source

pub fn jid(&mut self, key: &str) -> Jid

Source

pub fn non_ad_jid(&mut self, key: &str) -> Jid

Source

pub fn optional_bool(&mut self, key: &str) -> bool

Source

pub fn bool(&mut self, key: &str) -> bool

Source

pub fn optional_u64(&mut self, key: &str) -> Option<u64>

Source

pub fn unix_time(&mut self, key: &str) -> i64

Source

pub fn optional_unix_time(&mut self, key: &str) -> Option<i64>

Source

pub fn unix_milli(&mut self, key: &str) -> i64

Source

pub fn optional_unix_milli(&mut self, key: &str) -> Option<i64>

Auto Trait Implementations§

§

impl<'a> Freeze for AttrParserRef<'a>

§

impl<'a> !RefUnwindSafe for AttrParserRef<'a>

§

impl<'a> Send for AttrParserRef<'a>

§

impl<'a> Sync for AttrParserRef<'a>

§

impl<'a> Unpin for AttrParserRef<'a>

§

impl<'a> !UnwindSafe for AttrParserRef<'a>

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.