[−][src]Enum bgb_link::commands::typed::TypedBgbCommand
Particular commands and their relevant data.
Variants
Fields of Version
valid: bool
Fields of Joypad
pressed: bool
Fields of Sync2
data: u8
Fields of Sync3Timestamp
timestamp: u32
Methods
impl TypedBgbCommand
[src]
pub fn to_raw(&self) -> RawBgbCommand
[src]
Places the command data in the proper fields for serialization.
pub fn from_raw(raw: &RawBgbCommand) -> Result<TypedBgbCommand, CommandError>
[src]
Reads the command data from the raw fields.
In most cases, this will accept malformed input and either ignore it or pass it along.
The exceptions are if b1
is not recognized as a valid command type or if the b2
field of a sync3
command is not recognized.
pub fn deserialize(bytes: &[u8; 8]) -> Result<TypedBgbCommand, CommandError>
[src]
Read the provided buffer directly as a command.
Trait Implementations
impl BgbCommand for TypedBgbCommand
[src]
impl Clone for TypedBgbCommand
[src]
fn clone(&self) -> TypedBgbCommand
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for TypedBgbCommand
[src]
impl PartialEq<TypedBgbCommand> for TypedBgbCommand
[src]
fn eq(&self, other: &TypedBgbCommand) -> bool
[src]
fn ne(&self, other: &TypedBgbCommand) -> bool
[src]
impl StructuralPartialEq for TypedBgbCommand
[src]
Auto Trait Implementations
impl RefUnwindSafe for TypedBgbCommand
impl Send for TypedBgbCommand
impl Sync for TypedBgbCommand
impl Unpin for TypedBgbCommand
impl UnwindSafe for TypedBgbCommand
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,