pub struct ReadData<'a> {
pub data: &'a [u8],
pub size: usize,
}
Expand description
Structure for holding read data from serial ports
This structure holds data that has been read from a serial port, including a reference to the data and its size.
§Example
use tauri_plugin_serialplugin::state::ReadData;
let data = b"Hello World";
let read_data = ReadData {
data: data,
size: data.len(),
};
Fields§
§data: &'a [u8]
Reference to the read data bytes
size: usize
Size of the read data in bytes
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for ReadData<'a>
impl<'a> RefUnwindSafe for ReadData<'a>
impl<'a> Send for ReadData<'a>
impl<'a> Sync for ReadData<'a>
impl<'a> Unpin for ReadData<'a>
impl<'a> UnwindSafe for ReadData<'a>
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