Method

Struct Method 

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

A Method is a type of node within the AddressSpace.

Implementations§

Source§

impl Method

Source

pub fn new<R, S>( node_id: &NodeId, browse_name: R, display_name: S, executable: bool, user_executable: bool, ) -> Method

Source

pub fn from_attributes<S>( node_id: &NodeId, browse_name: S, attributes: MethodAttributes, ) -> Result<Self, ()>
where S: Into<QualifiedName>,

Source

pub fn is_valid(&self) -> bool

Source

pub fn executable(&self) -> bool

Source

pub fn set_executable(&mut self, executable: bool)

Source

pub fn user_executable(&self) -> bool

Source

pub fn set_user_executable(&mut self, user_executable: bool)

Source

pub fn set_callback(&mut self, callback: Box<dyn Method + Send + Sync>)

Source

pub fn has_callback(&self) -> bool

Source

pub fn call( &mut self, session_id: &NodeId, session_manager: Arc<RwLock<SessionManager>>, request: &CallMethodRequest, ) -> Result<CallMethodResult, StatusCode>

Trait Implementations§

Source§

impl Debug for Method

Source§

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

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

impl Default for Method

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Into<NodeType> for Method

Source§

fn into(self) -> NodeType

Converts this type into the (usually inferred) input type.
Source§

impl Node for Method

Source§

fn get_attribute_max_age( &self, timestamps_to_return: TimestampsToReturn, attribute_id: AttributeId, index_range: NumericRange, data_encoding: &QualifiedName, max_age: f64, ) -> Option<DataValue>

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

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

Sets the attribute with the new value
Source§

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

Finds the attribute and value.
Source§

impl NodeBase for Method

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>

Source§

fn set_description(&mut self, description: LocalizedText)

Source§

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

Source§

fn set_write_mask(&mut self, write_mask: WriteMask)

Source§

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

Source§

fn set_user_write_mask(&mut self, user_write_mask: WriteMask)

Auto Trait Implementations§

§

impl Freeze for Method

§

impl !RefUnwindSafe for Method

§

impl Send for Method

§

impl Sync for Method

§

impl Unpin for Method

§

impl !UnwindSafe for Method

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, 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.