pub enum AttrValue {
Array(Vec<Node>),
String(String),
Number(f64),
Integer(i64),
Boolean(bool),
Null,
}Expand description
Represents a typed attribute value that can be returned from or passed to attr/set_attr methods.
Variants§
Implementations§
Source§impl AttrValue
impl AttrValue
Sourcepub fn is_integer(&self) -> bool
pub fn is_integer(&self) -> bool
Returns true if the attribute value is an integer.
Sourcepub fn is_boolean(&self) -> bool
pub fn is_boolean(&self) -> bool
Returns true if the attribute value is a boolean.
Trait Implementations§
impl StructuralPartialEq for AttrValue
Auto Trait Implementations§
impl Freeze for AttrValue
impl RefUnwindSafe for AttrValue
impl Send for AttrValue
impl Sync for AttrValue
impl Unpin for AttrValue
impl UnsafeUnpin for AttrValue
impl UnwindSafe for AttrValue
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more