pub struct Output<V>(/* private fields */);Expand description
Output decoder for the read operations.
§Example
use fennec_modbus::protocol::{
codec::Decode,
function::{IntoValue, read_multiple::Output},
};
const BYTES: &[u8] = &[
0x04, // byte count
0x02, 0x2B, // register: high, low
0x00, 0x00, // register: high, low
];
#[expect(const_item_mutation)]
let value = Output::<u32>::decode(&mut BYTES).unwrap().into_value();
assert_eq!(value, 0x022B0000);Trait Implementations§
Auto Trait Implementations§
impl<V> Freeze for Output<V>where
V: Freeze,
impl<V> RefUnwindSafe for Output<V>where
V: RefUnwindSafe,
impl<V> Send for Output<V>where
V: Send,
impl<V> Sync for Output<V>where
V: Sync,
impl<V> Unpin for Output<V>where
V: Unpin,
impl<V> UnsafeUnpin for Output<V>where
V: UnsafeUnpin,
impl<V> UnwindSafe for Output<V>where
V: UnwindSafe,
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