Struct opcua_server::address_space::data_type::DataTypeBuilder
source · [−]pub struct DataTypeBuilder { /* 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 DataTypeBuilder
impl DataTypeBuilder
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) -> DataType
pub fn build(self) -> DataType
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.
Auto Trait Implementations
impl RefUnwindSafe for DataTypeBuilder
impl Send for DataTypeBuilder
impl Sync for DataTypeBuilder
impl Unpin for DataTypeBuilder
impl UnwindSafe for DataTypeBuilder
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