Struct modbus::scoped::ScopedCoil
source · pub struct ScopedCoil<'a> { /* private fields */ }
Expand description
Auto object which modifies it’s coil value depending on a given modification function if it goes out of scope.
Implementations§
source§impl<'a> ScopedCoil<'a>
impl<'a> ScopedCoil<'a>
sourcepub fn new(
transport: &mut Transport,
address: u16,
fun: CoilDropFunction
) -> Result<ScopedCoil<'_>>
pub fn new( transport: &mut Transport, address: u16, fun: CoilDropFunction ) -> Result<ScopedCoil<'_>>
Create a new ScopedCoil
object with address
and drop function when the object goes
out of scope.
pub fn mut_transport(&mut self) -> &mut Transport
Trait Implementations§
Auto Trait Implementations§
impl<'a> RefUnwindSafe for ScopedCoil<'a>
impl<'a> Send for ScopedCoil<'a>
impl<'a> Sync for ScopedCoil<'a>
impl<'a> Unpin for ScopedCoil<'a>
impl<'a> !UnwindSafe for ScopedCoil<'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