Struct rodbus::AddressRange
source · Expand description
Start and count tuple used when making various requests Cannot be constructed with invalid start/count
Fields§
§start: u16Starting address of the range
count: u16Count of elements in the range
Implementations§
source§impl AddressRange
impl AddressRange
sourcepub fn try_from(start: u16, count: u16) -> Result<Self, InvalidRange>
pub fn try_from(start: u16, count: u16) -> Result<Self, InvalidRange>
Create a new address range
sourcepub fn to_std_range(self) -> Range<usize>
pub fn to_std_range(self) -> Range<usize>
Converts to std::ops::Range
Trait Implementations§
source§impl Clone for AddressRange
impl Clone for AddressRange
source§fn clone(&self) -> AddressRange
fn clone(&self) -> AddressRange
Returns a copy 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 moresource§impl Debug for AddressRange
impl Debug for AddressRange
source§impl Display for AddressRange
impl Display for AddressRange
source§impl PartialEq<AddressRange> for AddressRange
impl PartialEq<AddressRange> for AddressRange
source§fn eq(&self, other: &AddressRange) -> bool
fn eq(&self, other: &AddressRange) -> bool
This method tests for
self and other values to be equal, and is used
by ==.