pub struct DeviceContext { /* private fields */ }Expand description
Per-unit Modbus device context.
Implementations§
Source§impl DeviceContext
impl DeviceContext
pub fn new( unit_id: u8, name: impl Into<String>, address_space: SharedAddressSpace, word_order: WordOrder, ) -> Self
pub fn with_response_delay(self, delay: Duration) -> Self
pub fn with_broadcast(self, enabled: bool) -> Self
pub fn unit_id(&self) -> u8
pub fn name(&self) -> &str
pub fn address_space(&self) -> SharedAddressSpace
pub fn word_order(&self) -> WordOrder
pub fn response_delay(&self) -> Duration
pub fn broadcast_enabled(&self) -> bool
Trait Implementations§
Source§impl Clone for DeviceContext
impl Clone for DeviceContext
Source§fn clone(&self) -> DeviceContext
fn clone(&self) -> DeviceContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DeviceContext
impl !RefUnwindSafe for DeviceContext
impl Send for DeviceContext
impl Sync for DeviceContext
impl Unpin for DeviceContext
impl UnsafeUnpin for DeviceContext
impl !UnwindSafe for DeviceContext
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