pub struct DevicePacket {
pub data: Vec<u8>,
pub len: usize,
}Expand description
Device-level network packet for raw data transmission
Fields§
§data: Vec<u8>Raw packet data
len: usizeLength of valid data in the packet
Implementations§
Source§impl DevicePacket
impl DevicePacket
Sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Create a new packet with the given capacity
Sourcepub fn as_mut_slice(&mut self) -> &mut [u8]
pub fn as_mut_slice(&mut self) -> &mut [u8]
Get the packet data as a mutable slice
Trait Implementations§
Source§impl Clone for DevicePacket
impl Clone for DevicePacket
Source§fn clone(&self) -> DevicePacket
fn clone(&self) -> DevicePacket
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DevicePacket
impl RefUnwindSafe for DevicePacket
impl Send for DevicePacket
impl Sync for DevicePacket
impl Unpin for DevicePacket
impl UnwindSafe for DevicePacket
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)