Struct opcua_server::address_space::AttrFnSetter
source · [−]pub struct AttrFnSetter<F> where
F: FnMut(&NodeId, AttributeId, NumericRange, DataValue) -> Result<(), StatusCode> + Send, { /* private fields */ }
Expand description
An implementation of attribute setter that can be easily constructed using a mutable function
Implementations
sourceimpl<F> AttrFnSetter<F> where
F: FnMut(&NodeId, AttributeId, NumericRange, DataValue) -> Result<(), StatusCode> + Send,
impl<F> AttrFnSetter<F> where
F: FnMut(&NodeId, AttributeId, NumericRange, DataValue) -> Result<(), StatusCode> + Send,
pub fn new(setter: F) -> AttrFnSetter<F>
pub fn new_boxed(setter: F) -> Arc<Mutex<AttrFnSetter<F>>>
Trait Implementations
sourceimpl<F> AttributeSetter for AttrFnSetter<F> where
F: FnMut(&NodeId, AttributeId, NumericRange, DataValue) -> Result<(), StatusCode> + Send,
impl<F> AttributeSetter for AttrFnSetter<F> where
F: FnMut(&NodeId, AttributeId, NumericRange, DataValue) -> Result<(), StatusCode> + Send,
sourcefn set(
&mut self,
node_id: &NodeId,
attribute_id: AttributeId,
index_range: NumericRange,
data_value: DataValue
) -> Result<(), StatusCode>
fn set(
&mut self,
node_id: &NodeId,
attribute_id: AttributeId,
index_range: NumericRange,
data_value: DataValue
) -> Result<(), StatusCode>
Sets the attribute on the specified node
Auto Trait Implementations
impl<F> RefUnwindSafe for AttrFnSetter<F> where
F: RefUnwindSafe,
impl<F> Send for AttrFnSetter<F>
impl<F> Sync for AttrFnSetter<F> where
F: Sync,
impl<F> Unpin for AttrFnSetter<F> where
F: Unpin,
impl<F> UnwindSafe for AttrFnSetter<F> where
F: UnwindSafe,
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