pub struct DataTypeTree { /* private fields */ }Expand description
Data type tree, used for loading custom types at runtime.
Implementations§
Source§impl DataTypeTree
impl DataTypeTree
Sourcepub fn new(parent_ids: ParentIds) -> Self
pub fn new(parent_ids: ParentIds) -> Self
Create a new data type tree with the given parent IDs.
Parent IDs should be populated before starting to populate the type tree.
Sourcepub fn get_type<'a>(&'a self, id: &NodeId) -> Option<TypeInfoRef<'a>>
pub fn get_type<'a>(&'a self, id: &NodeId) -> Option<TypeInfoRef<'a>>
Get a type from the tree.
Sourcepub fn get_struct_type(&self, id: &NodeId) -> Option<&Arc<StructTypeInfo>>
pub fn get_struct_type(&self, id: &NodeId) -> Option<&Arc<StructTypeInfo>>
Get a struct type from the tree.
Sourcepub fn parent_ids_mut(&mut self) -> &mut ParentIds
pub fn parent_ids_mut(&mut self) -> &mut ParentIds
Get a mutable reference to the parent ID map.
Sourcepub fn parent_ids(&self) -> &ParentIds
pub fn parent_ids(&self) -> &ParentIds
Get a reference to the parent ID map.
Sourcepub fn encoding_to_data_type(&self) -> &HashMap<NodeId, NodeId>
pub fn encoding_to_data_type(&self) -> &HashMap<NodeId, NodeId>
Get the inner map from encoding to data type ID.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DataTypeTree
impl RefUnwindSafe for DataTypeTree
impl Send for DataTypeTree
impl Sync for DataTypeTree
impl Unpin for DataTypeTree
impl UnsafeUnpin for DataTypeTree
impl UnwindSafe for DataTypeTree
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