[][src]Struct tokio_modbus::slave::Slave

pub struct Slave(pub SlaveId);

A single byte for addressing Modbus slave devices.

Methods

impl Slave[src]

pub const fn broadcast() -> Self[src]

The special address for sending a broadcast message to all connected Modbus slave devices at once. Broadcast messages are one-way and sent from the master to all slaves, i.e. a request without a response.

pub const fn min_device() -> Self[src]

The minimum address of a single Modbus slave device.

pub const fn max_device() -> Self[src]

The maximum address of a single Modbus slave device.

pub const fn tcp_device() -> Self[src]

The reserved address for sending a message to a directly connected Modbus TCP device, i.e. if not forwarded through a TCP/RTU gateway according to the unit identifier.

MODBUS Messaging on TCP/IP Implementation Guide, page 23 "On TCP/IP, the MODBUS server is addressed using its IP address; therefore, the MODBUS Unit Identifier is useless. The value 0xFF has to be used."

pub fn is_broadcast(self) -> bool[src]

pub fn is_single_device(self) -> bool[src]

pub fn is_reserved(self) -> bool[src]

Trait Implementations

impl Copy for Slave[src]

impl PartialOrd<Slave> for Slave[src]

impl PartialEq<Slave> for Slave[src]

impl Eq for Slave[src]

impl Ord for Slave[src]

default fn max(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the maximum of two values. Read more

default fn min(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the minimum of two values. Read more

default fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl Clone for Slave[src]

default fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl From<u8> for Slave[src]

impl From<Slave> for SlaveId[src]

impl Display for Slave[src]

impl Debug for Slave[src]

impl FromStr for Slave[src]

type Err = ParseIntError

The associated error which can be returned from parsing.

Auto Trait Implementations

impl Send for Slave

impl Sync for Slave

Blanket Implementations

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T