Struct opcua_server::address_space::object::ObjectBuilder
source · [−]pub struct ObjectBuilder { /* 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 ObjectBuilder
impl ObjectBuilder
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) -> Object
pub fn build(self) -> Object
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 ObjectBuilder
impl ObjectBuilder
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 ObjectBuilder
impl ObjectBuilder
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 ObjectBuilder
impl ObjectBuilder
pub fn is_folder(self) -> Self
pub fn event_notifier(self, event_notifier: EventNotifier) -> Self
pub fn has_type_definition<T>(self, type_id: T) -> Self where
T: Into<NodeId>,
pub fn has_event_source<T>(self, source_id: T) -> Self where
T: Into<NodeId>,
Auto Trait Implementations
impl RefUnwindSafe for ObjectBuilder
impl Send for ObjectBuilder
impl Sync for ObjectBuilder
impl Unpin for ObjectBuilder
impl UnwindSafe for ObjectBuilder
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