pub struct InitializationPacket<T: AsRef<[u8]>> {
pub channel: Channel,
pub command: Command,
pub length: u16,
pub data: T,
}Expand description
A CTAPHID initialization packet.
Fields§
§channel: ChannelThe channel this packet is sent or received on.
command: CommandThe CTAPHID command.
length: u16The length of the payload data.
data: TThe payload data.
Implementations§
Trait Implementations§
Source§impl<T: Clone + AsRef<[u8]>> Clone for InitializationPacket<T>
impl<T: Clone + AsRef<[u8]>> Clone for InitializationPacket<T>
Source§fn clone(&self) -> InitializationPacket<T>
fn clone(&self) -> InitializationPacket<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: AsRef<[u8]> + Default + Extend<u8>, S: AsRef<[u8]>> From<InitializationPacket<S>> for DefragmentedMessage<T>
impl<T: AsRef<[u8]> + Default + Extend<u8>, S: AsRef<[u8]>> From<InitializationPacket<S>> for DefragmentedMessage<T>
Source§fn from(packet: InitializationPacket<S>) -> Self
fn from(packet: InitializationPacket<S>) -> Self
Converts to this type from the input type.
Source§impl<T: AsRef<[u8]> + Default + Extend<u8>, S: AsRef<[u8]>> From<InitializationPacket<S>> for PartialMessage<T>
impl<T: AsRef<[u8]> + Default + Extend<u8>, S: AsRef<[u8]>> From<InitializationPacket<S>> for PartialMessage<T>
Source§fn from(packet: InitializationPacket<S>) -> Self
fn from(packet: InitializationPacket<S>) -> Self
Converts to this type from the input type.
Source§impl<T: AsRef<[u8]>> From<InitializationPacket<T>> for Packet<T>
impl<T: AsRef<[u8]>> From<InitializationPacket<T>> for Packet<T>
Source§fn from(packet: InitializationPacket<T>) -> Self
fn from(packet: InitializationPacket<T>) -> Self
Converts to this type from the input type.
Source§impl<T: Ord + AsRef<[u8]>> Ord for InitializationPacket<T>
impl<T: Ord + AsRef<[u8]>> Ord for InitializationPacket<T>
Source§fn cmp(&self, other: &InitializationPacket<T>) -> Ordering
fn cmp(&self, other: &InitializationPacket<T>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<T: PartialOrd + AsRef<[u8]>> PartialOrd for InitializationPacket<T>
impl<T: PartialOrd + AsRef<[u8]>> PartialOrd for InitializationPacket<T>
impl<T: Copy + AsRef<[u8]>> Copy for InitializationPacket<T>
impl<T: Eq + AsRef<[u8]>> Eq for InitializationPacket<T>
impl<T: AsRef<[u8]>> StructuralPartialEq for InitializationPacket<T>
Auto Trait Implementations§
impl<T> Freeze for InitializationPacket<T>where
T: Freeze,
impl<T> RefUnwindSafe for InitializationPacket<T>where
T: RefUnwindSafe,
impl<T> Send for InitializationPacket<T>where
T: Send,
impl<T> Sync for InitializationPacket<T>where
T: Sync,
impl<T> Unpin for InitializationPacket<T>where
T: Unpin,
impl<T> UnwindSafe for InitializationPacket<T>where
T: 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