[][src]Struct gc_adapter::ControllerStatus

pub struct ControllerStatus { /* fields omitted */ }

Status of controller for the given port

Implementations

impl ControllerStatus[src]

pub const fn new() -> Self[src]

Returns an instance with zero initialized data.

impl ControllerStatus[src]

pub const fn into_bytes(self) -> [u8; 1][src]

Returns the underlying bits.

Layout

The returned byte array is layed out in the same way as described here.

pub const fn from_bytes(bytes: [u8; 1]) -> Self[src]

Converts the given bytes directly into the bitfield struct.

impl ControllerStatus[src]

pub fn unk(&self) -> <bool as Specifier>::InOut[src]

Returns the value of unk.

pub fn unk_or_err(
    &self
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
[src]

Returns the value of unk.

#Errors

If the returned value contains an invalid bit pattern for unk.

pub fn with_unk(self, new_val: <bool as Specifier>::InOut) -> Self[src]

Returns a copy of the bitfield with the value of unk set to the given value.

#Panics

If the given value is out of bounds for unk.

pub fn with_unk_checked(
    self,
    new_val: <bool as Specifier>::InOut
) -> Result<Self, OutOfBounds>
[src]

Returns a copy of the bitfield with the value of unk set to the given value.

#Errors

If the given value is out of bounds for unk.

pub fn set_unk(&mut self, new_val: <bool as Specifier>::InOut)[src]

Sets the value of unk to the given value.

#Panics

If the given value is out of bounds for unk.

pub fn set_unk_checked(
    &mut self,
    new_val: <bool as Specifier>::InOut
) -> Result<(), OutOfBounds>
[src]

Sets the value of unk to the given value.

#Errors

If the given value is out of bounds for unk.

pub fn unk2(&self) -> <bool as Specifier>::InOut[src]

Returns the value of unk2.

pub fn unk2_or_err(
    &self
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
[src]

Returns the value of unk2.

#Errors

If the returned value contains an invalid bit pattern for unk2.

pub fn with_unk2(self, new_val: <bool as Specifier>::InOut) -> Self[src]

Returns a copy of the bitfield with the value of unk2 set to the given value.

#Panics

If the given value is out of bounds for unk2.

pub fn with_unk2_checked(
    self,
    new_val: <bool as Specifier>::InOut
) -> Result<Self, OutOfBounds>
[src]

Returns a copy of the bitfield with the value of unk2 set to the given value.

#Errors

If the given value is out of bounds for unk2.

pub fn set_unk2(&mut self, new_val: <bool as Specifier>::InOut)[src]

Sets the value of unk2 to the given value.

#Panics

If the given value is out of bounds for unk2.

pub fn set_unk2_checked(
    &mut self,
    new_val: <bool as Specifier>::InOut
) -> Result<(), OutOfBounds>
[src]

Sets the value of unk2 to the given value.

#Errors

If the given value is out of bounds for unk2.

pub fn has_rumble(&self) -> <bool as Specifier>::InOut[src]

Returns the value of has_rumble.

pub fn has_rumble_or_err(
    &self
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
[src]

Returns the value of has_rumble.

#Errors

If the returned value contains an invalid bit pattern for has_rumble.

pub fn with_has_rumble(self, new_val: <bool as Specifier>::InOut) -> Self[src]

Returns a copy of the bitfield with the value of has_rumble set to the given value.

#Panics

If the given value is out of bounds for has_rumble.

pub fn with_has_rumble_checked(
    self,
    new_val: <bool as Specifier>::InOut
) -> Result<Self, OutOfBounds>
[src]

Returns a copy of the bitfield with the value of has_rumble set to the given value.

#Errors

If the given value is out of bounds for has_rumble.

pub fn set_has_rumble(&mut self, new_val: <bool as Specifier>::InOut)[src]

Sets the value of has_rumble to the given value.

#Panics

If the given value is out of bounds for has_rumble.

pub fn set_has_rumble_checked(
    &mut self,
    new_val: <bool as Specifier>::InOut
) -> Result<(), OutOfBounds>
[src]

Sets the value of has_rumble to the given value.

#Errors

If the given value is out of bounds for has_rumble.

pub fn unk3(&self) -> <bool as Specifier>::InOut[src]

Returns the value of unk3.

pub fn unk3_or_err(
    &self
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
[src]

Returns the value of unk3.

#Errors

If the returned value contains an invalid bit pattern for unk3.

pub fn with_unk3(self, new_val: <bool as Specifier>::InOut) -> Self[src]

Returns a copy of the bitfield with the value of unk3 set to the given value.

#Panics

If the given value is out of bounds for unk3.

pub fn with_unk3_checked(
    self,
    new_val: <bool as Specifier>::InOut
) -> Result<Self, OutOfBounds>
[src]

Returns a copy of the bitfield with the value of unk3 set to the given value.

#Errors

If the given value is out of bounds for unk3.

pub fn set_unk3(&mut self, new_val: <bool as Specifier>::InOut)[src]

Sets the value of unk3 to the given value.

#Panics

If the given value is out of bounds for unk3.

pub fn set_unk3_checked(
    &mut self,
    new_val: <bool as Specifier>::InOut
) -> Result<(), OutOfBounds>
[src]

Sets the value of unk3 to the given value.

#Errors

If the given value is out of bounds for unk3.

pub fn controller_type(&self) -> <ControllerType as Specifier>::InOut[src]

Returns the value of controller_type.

pub fn controller_type_or_err(
    &self
) -> Result<<ControllerType as Specifier>::InOut, InvalidBitPattern<<ControllerType as Specifier>::Bytes>>
[src]

Returns the value of controller_type.

#Errors

If the returned value contains an invalid bit pattern for controller_type.

pub fn with_controller_type(
    self,
    new_val: <ControllerType as Specifier>::InOut
) -> Self
[src]

Returns a copy of the bitfield with the value of controller_type set to the given value.

#Panics

If the given value is out of bounds for controller_type.

pub fn with_controller_type_checked(
    self,
    new_val: <ControllerType as Specifier>::InOut
) -> Result<Self, OutOfBounds>
[src]

Returns a copy of the bitfield with the value of controller_type set to the given value.

#Errors

If the given value is out of bounds for controller_type.

pub fn set_controller_type(
    &mut self,
    new_val: <ControllerType as Specifier>::InOut
)
[src]

Sets the value of controller_type to the given value.

#Panics

If the given value is out of bounds for controller_type.

pub fn set_controller_type_checked(
    &mut self,
    new_val: <ControllerType as Specifier>::InOut
) -> Result<(), OutOfBounds>
[src]

Sets the value of controller_type to the given value.

#Errors

If the given value is out of bounds for controller_type.

Trait Implementations

impl BinRead for ControllerStatus[src]

type Args = ()

The type of arguments needed to be supplied in order to read this type, usually a tuple. Read more

impl CheckTotalSizeMultipleOf8 for ControllerStatus[src]

type Size = TotalSize<[(); 0]>

impl Clone for ControllerStatus[src]

impl Copy for ControllerStatus[src]

impl Debug for ControllerStatus[src]

impl Default for ControllerStatus[src]

impl PartialEq<ControllerStatus> for ControllerStatus[src]

impl StructuralPartialEq for ControllerStatus[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.