pub struct ModbusBuffer<const CAPACITY: usize> { /* private fields */ }Implementations§
Source§impl<const CAPACITY: usize> ModbusBuffer<CAPACITY>
impl<const CAPACITY: usize> ModbusBuffer<CAPACITY>
Sourcepub fn min_frame_len(self, min_frame_len: usize) -> Self
pub fn min_frame_len(self, min_frame_len: usize) -> Self
Sets the minimum frame length required to detect a Modbus frame, excluding CRC.
Sourcepub fn max_frame_len(self, max_frame_len: usize) -> Self
pub fn max_frame_len(self, max_frame_len: usize) -> Self
Sets the maximum frame length that can be detected, excluding CRC.
Sourcepub fn overwrite(self, overwrite: bool) -> Self
pub fn overwrite(self, overwrite: bool) -> Self
Configures whether to overwrite old data if the buffer is full or to panic.
Sourcepub fn push(&mut self, item: u8)
pub fn push(&mut self, item: u8)
Adds an item to the buffer, handling overflow based on the overwrite flag.
Trait Implementations§
Auto Trait Implementations§
impl<const CAPACITY: usize> Freeze for ModbusBuffer<CAPACITY>
impl<const CAPACITY: usize> RefUnwindSafe for ModbusBuffer<CAPACITY>
impl<const CAPACITY: usize> Send for ModbusBuffer<CAPACITY>
impl<const CAPACITY: usize> Sync for ModbusBuffer<CAPACITY>
impl<const CAPACITY: usize> Unpin for ModbusBuffer<CAPACITY>
impl<const CAPACITY: usize> UnwindSafe for ModbusBuffer<CAPACITY>
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