Skip to main content

Base

Struct Base 

Source
pub struct Base { /* private fields */ }
Expand description

Base node class contains the attributes that all other kinds of nodes need. Part 3, diagram B.4

Implementations§

Source§

impl Base

Source

pub fn new( node_class: NodeClass, node_id: &NodeId, browse_name: impl Into<QualifiedName>, display_name: impl Into<LocalizedText>, ) -> Base

Create a new base node.

Source

pub fn new_full( node_id: NodeId, node_class: NodeClass, browse_name: QualifiedName, display_name: LocalizedText, description: Option<LocalizedText>, write_mask: Option<u32>, user_write_mask: Option<u32>, ) -> Self

Create a new base node with all attributes, may change if new attributes are added to the OPC-UA standard.

Source

pub fn is_valid(&self) -> bool

Get whether this base node is valid.

Source

pub fn set_node_id(&mut self, node_id: NodeId)

Set the node ID of this node.

Source

pub fn set_browse_name(&mut self, browse_name: impl Into<QualifiedName>)

Set the browse name of this node.

Trait Implementations§

Source§

impl Debug for Base

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Node for Base

Source§

fn set_attribute( &mut self, attribute_id: AttributeId, value: Variant, ) -> Result<(), StatusCode>

Tries to set the attribute if its one of the common attribute, otherwise it returns the value for the subclass to handle.

Source§

fn get_attribute_max_age( &self, _timestamps_to_return: TimestampsToReturn, attribute_id: AttributeId, _index_range: &NumericRange, _data_encoding: &DataEncoding, _max_age: f64, ) -> Option<DataValue>

Finds the attribute and value. The param max_age is a hint in milliseconds: Read more
Source§

fn get_attribute( &self, timestamps_to_return: TimestampsToReturn, attribute_id: AttributeId, index_range: &NumericRange, data_encoding: &DataEncoding, ) -> Option<DataValue>

Finds the attribute and value.
Source§

impl NodeBase for Base

Source§

fn node_class(&self) -> NodeClass

Returns the node class - Object, ObjectType, Method, DataType, ReferenceType, Variable, VariableType or View
Source§

fn node_id(&self) -> &NodeId

Returns the node’s NodeId
Source§

fn browse_name(&self) -> &QualifiedName

Returns the node’s browse name
Source§

fn display_name(&self) -> &LocalizedText

Returns the node’s display name
Source§

fn set_display_name(&mut self, display_name: LocalizedText)

Sets the node’s display name
Source§

fn description(&self) -> Option<&LocalizedText>

Get the description of this node.
Source§

fn set_description(&mut self, description: LocalizedText)

Set the description of this node.
Source§

fn write_mask(&self) -> Option<WriteMask>

Get the write mask of this node.
Source§

fn set_write_mask(&mut self, write_mask: WriteMask)

Set the write mask of this node.
Source§

fn user_write_mask(&self) -> Option<WriteMask>

Get the user write mask for this node.
Source§

fn set_user_write_mask(&mut self, user_write_mask: WriteMask)

Set the user write mask for this node.

Auto Trait Implementations§

§

impl Freeze for Base

§

impl RefUnwindSafe for Base

§

impl Send for Base

§

impl Sync for Base

§

impl Unpin for Base

§

impl UnsafeUnpin for Base

§

impl UnwindSafe for Base

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more