Struct opcua_server::address_space::view::ViewBuilder
source · [−]pub struct ViewBuilder { /* 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 ViewBuilder
impl ViewBuilder
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) -> View
pub fn build(self) -> View
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 ViewBuilder
impl ViewBuilder
pub fn generates_event<T>(self, event_type: T) -> Self where
T: Into<NodeId>,
sourceimpl ViewBuilder
impl ViewBuilder
pub fn contains_no_loops(self, contains_no_loops: bool) -> Self
pub fn event_notifier(self, event_notifier: EventNotifier) -> Self
Auto Trait Implementations
impl RefUnwindSafe for ViewBuilder
impl Send for ViewBuilder
impl Sync for ViewBuilder
impl Unpin for ViewBuilder
impl UnwindSafe for ViewBuilder
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