Enum modbus::scoped::RegisterDropFunction
source · pub enum RegisterDropFunction<'a> {
Zero,
Increment,
Decrement,
Value(u16),
Fun(&'a dyn Fn(u16) -> u16),
}
Expand description
Action to perform when the ScopedRegister
is dropped.
Variants§
Zero
Set the register to zero value
Increment
Increment the current register value by 1
Decrement
Decrement the current register value by 1
Value(u16)
Set the register value to the given value.
Fun(&'a dyn Fn(u16) -> u16)
Execute the given function on the current value, setting the register with the result value.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for RegisterDropFunction<'a>
impl<'a> !Send for RegisterDropFunction<'a>
impl<'a> !Sync for RegisterDropFunction<'a>
impl<'a> Unpin for RegisterDropFunction<'a>
impl<'a> !UnwindSafe for RegisterDropFunction<'a>
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