pub struct RoleMap { /* private fields */ }Expand description
Role map - maps custom structure types to standard types
Allows extending the structure type system while maintaining compatibility with standard types.
Implementations§
Source§impl RoleMap
impl RoleMap
Sourcepub fn add_mapping(
&mut self,
custom_type: impl Into<String>,
standard_type: StandardStructureType,
)
pub fn add_mapping( &mut self, custom_type: impl Into<String>, standard_type: StandardStructureType, )
Adds a mapping from a custom type to a standard type
Sourcepub fn get_mapping(&self, custom_type: &str) -> Option<&StandardStructureType>
pub fn get_mapping(&self, custom_type: &str) -> Option<&StandardStructureType>
Gets the standard type for a custom type (if mapped)
Sourcepub fn mappings(&self) -> &HashMap<String, StandardStructureType>
pub fn mappings(&self) -> &HashMap<String, StandardStructureType>
Returns all mappings
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RoleMap
impl RefUnwindSafe for RoleMap
impl Send for RoleMap
impl Sync for RoleMap
impl Unpin for RoleMap
impl UnsafeUnpin for RoleMap
impl UnwindSafe for RoleMap
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