pub struct Attributes { /* private fields */ }Implementations§
Source§impl Attributes
impl Attributes
pub fn new() -> Self
pub fn set(&mut self, key: impl Into<String>, value: Attribute)
pub fn get(&self, key: &str) -> Option<&Attribute>
pub fn get_integer(&self, key: &str) -> Option<i64>
pub fn get_float(&self, key: &str) -> Option<f64>
pub fn get_bool(&self, key: &str) -> Option<bool>
pub fn get_string_id(&self, key: &str) -> Option<StringId>
pub fn remove(&mut self, key: &str) -> Option<Attribute>
pub fn contains(&self, key: &str) -> bool
pub fn iter(&self) -> impl Iterator<Item = (&String, &Attribute)>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Clone for Attributes
impl Clone for Attributes
Source§fn clone(&self) -> Attributes
fn clone(&self) -> Attributes
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Attributes
impl Debug for Attributes
Source§impl Default for Attributes
impl Default for Attributes
Source§fn default() -> Attributes
fn default() -> Attributes
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for Attributes
impl<'de> Deserialize<'de> for Attributes
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for Attributes
impl PartialEq for Attributes
Auto Trait Implementations§
impl Freeze for Attributes
impl RefUnwindSafe for Attributes
impl Send for Attributes
impl Sync for Attributes
impl Unpin for Attributes
impl UnsafeUnpin for Attributes
impl UnwindSafe for Attributes
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