pub struct AttributeMap { /* private fields */ }Expand description
Attribute lookup helper
Implementations§
Source§impl AttributeMap
impl AttributeMap
Sourcepub fn new(attrs: Vec<ParsedAttribute>) -> Self
pub fn new(attrs: Vec<ParsedAttribute>) -> Self
Create from parsed attributes (XSD attributes only)
Sourcepub fn get(&self, name_id: NameId) -> Option<&ParsedAttribute>
pub fn get(&self, name_id: NameId) -> Option<&ParsedAttribute>
Get an attribute by local name
Sourcepub fn get_value_by_name(
&self,
name_table: &NameTable,
name: &str,
) -> Option<&str>
pub fn get_value_by_name( &self, name_table: &NameTable, name: &str, ) -> Option<&str>
Get an attribute value by local name string (looks up in name table)
Sourcepub fn take(&mut self, name_id: NameId) -> Option<ParsedAttribute>
pub fn take(&mut self, name_id: NameId) -> Option<ParsedAttribute>
Remove an attribute and return it
Sourcepub fn remaining(&self) -> &[ParsedAttribute]
pub fn remaining(&self) -> &[ParsedAttribute]
Get remaining attributes (for detecting unknown attributes)
Auto Trait Implementations§
impl Freeze for AttributeMap
impl RefUnwindSafe for AttributeMap
impl Send for AttributeMap
impl Sync for AttributeMap
impl Unpin for AttributeMap
impl UnsafeUnpin for AttributeMap
impl UnwindSafe for AttributeMap
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