pub struct L2capPdu {
pub length: u16,
pub channel_id: u16,
pub payload: Vec<u8>,
}Expand description
L2CAP Protocol Data Unit
Fields§
§length: u16Payload length (excluding header)
channel_id: u16Channel ID
payload: Vec<u8>Payload data
Implementations§
Source§impl L2capPdu
impl L2capPdu
Sourcepub fn serialize(&self, buf: &mut [u8]) -> Result<usize, KernelError>
pub fn serialize(&self, buf: &mut [u8]) -> Result<usize, KernelError>
Serialize PDU to buffer, returns bytes written
Sourcepub fn parse(buf: &[u8]) -> Result<Self, KernelError>
pub fn parse(buf: &[u8]) -> Result<Self, KernelError>
Parse a PDU from raw buffer
Trait Implementations§
Auto Trait Implementations§
impl Freeze for L2capPdu
impl RefUnwindSafe for L2capPdu
impl Send for L2capPdu
impl Sync for L2capPdu
impl Unpin for L2capPdu
impl UnwindSafe for L2capPdu
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)