[][src]Struct opcua_server::address_space::variable::VariableBuilder

pub struct VariableBuilder { /* fields omitted */ }

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

impl VariableBuilder[src]

pub fn new<T, S>(node_id: &NodeId, browse_name: T, display_name: S) -> Self where
    T: Into<QualifiedName>,
    S: Into<LocalizedText>, 
[src]

Creates a builder for a node. All nodes are required to su

pub fn get_node_id(&self) -> NodeId[src]

pub fn is_valid(&self) -> bool[src]

Tests that the builder is in a valid state to build or insert the node.

pub fn description<V>(self, description: V) -> Self where
    V: Into<LocalizedText>, 
[src]

Sets the description of the node

pub fn reference<T>(
    self,
    node_id: T,
    reference_type_id: ReferenceTypeId,
    reference_direction: ReferenceDirection
) -> Self where
    T: Into<NodeId>, 
[src]

Adds a reference to the node

pub fn organizes<T>(self, organizes_id: T) -> Self where
    T: Into<NodeId>, 
[src]

Indicates this node organizes another node by its id.

pub fn organized_by<T>(self, organized_by_id: T) -> Self where
    T: Into<NodeId>, 
[src]

Indicates this node is organised by another node by its id

pub fn build(self) -> Variable[src]

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.

pub fn insert(self, address_space: &mut AddressSpace) -> bool[src]

Inserts the node into the address space, including references. This function will panic if the node is in an invalid state.

impl VariableBuilder[src]

pub fn component_of<T>(self, component_of_id: T) -> Self where
    T: Into<NodeId>, 
[src]

pub fn has_component<T>(self, has_component_id: T) -> Self where
    T: Into<NodeId>, 
[src]

impl VariableBuilder[src]

pub fn has_property<T>(self, has_component_id: T) -> Self where
    T: Into<NodeId>, 
[src]

pub fn property_of<T>(self, component_of_id: T) -> Self where
    T: Into<NodeId>, 
[src]

impl VariableBuilder[src]

pub fn value<V>(self, value: V) -> Self where
    V: Into<Variant>, 
[src]

Sets the value of the variable.

pub fn data_type<T>(self, data_type: T) -> Self where
    T: Into<NodeId>, 
[src]

Sets the data type of the variable.

pub fn historizing(self, historizing: bool) -> Self[src]

Sets the historizing flag for the variable.

pub fn access_level(self, access_level: AccessLevel) -> Self[src]

Sets the access level for the variable.

pub fn user_access_level(self, user_access_level: UserAccessLevel) -> Self[src]

Sets the user access level for the variable.

pub fn value_rank(self, value_rank: i32) -> Self[src]

Sets the value rank for the variable.

pub fn array_dimensions(self, array_dimensions: &[u32]) -> Self[src]

Sets the array dimensions for the variable.

pub fn writable(self) -> Self[src]

Makes the variable writable (by default it isn't)

pub fn history_readable(self) -> Self[src]

Makes the variable history-readable

pub fn history_updatable(self) -> Self[src]

Makes the variable history-updateable

pub fn minimum_sampling_interval(self, minimum_sampling_interval: f64) -> Self[src]

Sets the minimum sampling interval for the variable.

pub fn value_getter(
    self,
    getter: Arc<Mutex<dyn AttributeGetter + Send>>
) -> Self
[src]

Sets a value getter function for the variable. Whenever the value of a variable needs to be fetched (e.g. from a monitored item subscription), this trait will be called to get the value.

pub fn value_setter(
    self,
    setter: Arc<Mutex<dyn AttributeSetter + Send>>
) -> Self
[src]

Sets a value setter function for the variable. Whenever the value of a variable is set via a service, this trait will be called to set the value. It is up to the implementation to decide what to do if that happens.

pub fn has_type_definition<T>(self, type_id: T) -> Self where
    T: Into<NodeId>, 
[src]

Add a reference to the variable indicating it has a type of another node.

pub fn has_modelling_rule<T>(self, type_id: T) -> Self where
    T: Into<NodeId>, 
[src]

Add a reference to the variable indicating it has a modelling rule of another node.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,