pub struct Method { /* private fields */ }Expand description
A Method is a type of node within the AddressSpace.
Implementations§
Source§impl Method
impl Method
pub fn new<R, S>( node_id: &NodeId, browse_name: R, display_name: S, executable: bool, user_executable: bool, ) -> Method
pub fn from_attributes<S>(
node_id: &NodeId,
browse_name: S,
attributes: MethodAttributes,
) -> Result<Self, ()>where
S: Into<QualifiedName>,
pub fn is_valid(&self) -> bool
pub fn executable(&self) -> bool
pub fn set_executable(&mut self, executable: bool)
pub fn user_executable(&self) -> bool
pub fn set_user_executable(&mut self, user_executable: bool)
pub fn set_callback(&mut self, callback: Box<dyn Method + Send + Sync>)
pub fn has_callback(&self) -> bool
pub fn call( &mut self, session_id: &NodeId, session_manager: Arc<RwLock<SessionManager>>, request: &CallMethodRequest, ) -> Result<CallMethodResult, StatusCode>
Trait Implementations§
Source§impl Node for Method
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>
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 moreSource§fn set_attribute(
&mut self,
attribute_id: AttributeId,
value: Variant,
) -> Result<(), StatusCode>
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>
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
impl NodeBase for Method
Source§fn node_class(&self) -> NodeClass
fn node_class(&self) -> NodeClass
Returns the node class - Object, ObjectType, Method, DataType, ReferenceType, Variable, VariableType or View
Source§fn browse_name(&self) -> QualifiedName
fn browse_name(&self) -> QualifiedName
Returns the node’s browse name
Source§fn display_name(&self) -> LocalizedText
fn display_name(&self) -> LocalizedText
Returns the node’s display name
Source§fn set_display_name(&mut self, display_name: LocalizedText)
fn set_display_name(&mut self, display_name: LocalizedText)
Sets the node’s display name
fn description(&self) -> Option<LocalizedText>
fn set_description(&mut self, description: LocalizedText)
fn write_mask(&self) -> Option<WriteMask>
fn set_write_mask(&mut self, write_mask: WriteMask)
fn user_write_mask(&self) -> Option<WriteMask>
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 UnsafeUnpin for Method
impl !UnwindSafe for Method
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more