Struct opcua_server::address_space::object_type::ObjectTypeBuilder
source · [−]pub struct ObjectTypeBuilder { /* private fields */ }
Expand description
A builder for constructing a node of same name. This can be used as an easy way to create a node and the references it has to another node in a simple fashion.
Implementations
sourceimpl ObjectTypeBuilder
impl ObjectTypeBuilder
sourcepub fn new<T, S>(node_id: &NodeId, browse_name: T, display_name: S) -> Self where
T: Into<QualifiedName>,
S: Into<LocalizedText>,
pub fn new<T, S>(node_id: &NodeId, browse_name: T, display_name: S) -> Self where
T: Into<QualifiedName>,
S: Into<LocalizedText>,
Creates a builder for a node. All nodes are required to su
pub fn get_node_id(&self) -> NodeId
sourcepub fn is_valid(&self) -> bool
pub fn is_valid(&self) -> bool
Tests that the builder is in a valid state to build or insert the node.
sourcepub fn description<V>(self, description: V) -> Self where
V: Into<LocalizedText>,
pub fn description<V>(self, description: V) -> Self where
V: Into<LocalizedText>,
Sets the description of the node
sourcepub fn reference<T>(
self,
node_id: T,
reference_type_id: ReferenceTypeId,
reference_direction: ReferenceDirection
) -> Self where
T: Into<NodeId>,
pub fn reference<T>(
self,
node_id: T,
reference_type_id: ReferenceTypeId,
reference_direction: ReferenceDirection
) -> Self where
T: Into<NodeId>,
Adds a reference to the node
sourcepub fn organizes<T>(self, organizes_id: T) -> Self where
T: Into<NodeId>,
pub fn organizes<T>(self, organizes_id: T) -> Self where
T: Into<NodeId>,
Indicates this node organizes another node by its id.
sourcepub fn organized_by<T>(self, organized_by_id: T) -> Self where
T: Into<NodeId>,
pub fn organized_by<T>(self, organized_by_id: T) -> Self where
T: Into<NodeId>,
Indicates this node is organised by another node by its id
sourcepub fn build(self) -> ObjectType
pub fn build(self) -> ObjectType
Yields a built node. This function will panic if the node is invalid. Note that calling this function discards any references for the node, so there is no purpose in adding references if you intend to call this method.
sourcepub fn insert(self, address_space: &mut AddressSpace) -> bool
pub fn insert(self, address_space: &mut AddressSpace) -> bool
Inserts the node into the address space, including references. This function will panic if the node is in an invalid state.
sourceimpl ObjectTypeBuilder
impl ObjectTypeBuilder
pub fn generates_event<T>(self, event_type: T) -> Self where
T: Into<NodeId>,
sourceimpl ObjectTypeBuilder
impl ObjectTypeBuilder
pub fn subtype_of<T>(self, type_id: T) -> Self where
T: Into<NodeId>,
pub fn has_subtype<T>(self, subtype_id: T) -> Self where
T: Into<NodeId>,
sourceimpl ObjectTypeBuilder
impl ObjectTypeBuilder
pub fn component_of<T>(self, component_of_id: T) -> Self where
T: Into<NodeId>,
pub fn has_component<T>(self, has_component_id: T) -> Self where
T: Into<NodeId>,
sourceimpl ObjectTypeBuilder
impl ObjectTypeBuilder
pub fn has_property<T>(self, has_component_id: T) -> Self where
T: Into<NodeId>,
pub fn property_of<T>(self, component_of_id: T) -> Self where
T: Into<NodeId>,
sourceimpl ObjectTypeBuilder
impl ObjectTypeBuilder
pub fn is_abstract(self, is_abstract: bool) -> Self
Auto Trait Implementations
impl RefUnwindSafe for ObjectTypeBuilder
impl Send for ObjectTypeBuilder
impl Sync for ObjectTypeBuilder
impl Unpin for ObjectTypeBuilder
impl UnwindSafe for ObjectTypeBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more