pub struct DefaultTypeTree { /* private fields */ }Expand description
Type managing the types in an OPC-UA server. The server needs to know about all available types, to handle things like event filters, browse filtering, etc.
Each node manager is responsible for populating the type tree with its types.
Implementations§
Source§impl DefaultTypeTree
impl DefaultTypeTree
Sourcepub fn add_type_node(
&mut self,
id: &NodeId,
parent: &NodeId,
node_class: NodeClass,
)
pub fn add_type_node( &mut self, id: &NodeId, parent: &NodeId, node_class: NodeClass, )
Add a new type to the type tree.
Sourcepub fn add_type_property(
&mut self,
id: &NodeId,
typ: &NodeId,
path: &[&QualifiedName],
node_class: NodeClass,
)
pub fn add_type_property( &mut self, id: &NodeId, typ: &NodeId, path: &[&QualifiedName], node_class: NodeClass, )
Add a new property to the type tree.
Sourcepub fn namespaces_mut(&mut self) -> &mut NamespaceMap
pub fn namespaces_mut(&mut self) -> &mut NamespaceMap
Get a mutable reference to the namespaces used by this type tree.
Sourcepub fn namespaces(&self) -> &NamespaceMap
pub fn namespaces(&self) -> &NamespaceMap
Get a reference to the namespaces used by this type tree.
Sourcepub fn get_all_children<'a>(&'a self, root: &'a NodeId) -> Vec<&'a NodeId>
pub fn get_all_children<'a>(&'a self, root: &'a NodeId) -> Vec<&'a NodeId>
Get a vector of all the descendants of the given root node.
Trait Implementations§
Source§impl Clone for DefaultTypeTree
impl Clone for DefaultTypeTree
Source§fn clone(&self) -> DefaultTypeTree
fn clone(&self) -> DefaultTypeTree
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for DefaultTypeTree
impl Default for DefaultTypeTree
Source§fn default() -> DefaultTypeTree
fn default() -> DefaultTypeTree
Returns the “default value” for a type. Read more
Source§impl TypeTree for DefaultTypeTree
impl TypeTree for DefaultTypeTree
Source§fn is_subtype_of(&self, child: &NodeId, ancestor: &NodeId) -> bool
fn is_subtype_of(&self, child: &NodeId, ancestor: &NodeId) -> bool
Return true if child is a subtype of ancestor, or if child and
ancestor is the same node, i.e. subtype in the OPC-UA sense.
Source§fn get_node<'a>(&'a self, node: &NodeId) -> Option<TypeTreeNode<'a>>
fn get_node<'a>(&'a self, node: &NodeId) -> Option<TypeTreeNode<'a>>
Get a reference to a node in the type tree.
Source§fn find_type_prop_by_browse_path(
&self,
type_id: &NodeId,
path: &[QualifiedName],
) -> Option<&TypeProperty>
fn find_type_prop_by_browse_path( &self, type_id: &NodeId, path: &[QualifiedName], ) -> Option<&TypeProperty>
Find a property by browse and type ID.
Source§fn get_supertype<'a>(&'a self, node: &NodeId) -> Option<&'a NodeId>
fn get_supertype<'a>(&'a self, node: &NodeId) -> Option<&'a NodeId>
Get the supertype of the given node.
Source§fn namespaces(&self) -> &NamespaceMap
fn namespaces(&self) -> &NamespaceMap
Get the namespace map used by this type tree.
Auto Trait Implementations§
impl Freeze for DefaultTypeTree
impl RefUnwindSafe for DefaultTypeTree
impl Send for DefaultTypeTree
impl Sync for DefaultTypeTree
impl Unpin for DefaultTypeTree
impl UnsafeUnpin for DefaultTypeTree
impl UnwindSafe for DefaultTypeTree
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