[−][src]Struct gc_adapter::ControllerStatus
Status of controller for the given port
Implementations
impl ControllerStatus
[src]
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]
&self
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
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]
self,
new_val: <bool as Specifier>::InOut
) -> Result<Self, OutOfBounds>
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]
&mut self,
new_val: <bool as Specifier>::InOut
) -> Result<(), OutOfBounds>
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]
&self
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
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]
self,
new_val: <bool as Specifier>::InOut
) -> Result<Self, OutOfBounds>
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]
&mut self,
new_val: <bool as Specifier>::InOut
) -> Result<(), OutOfBounds>
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]
&self
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
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]
self,
new_val: <bool as Specifier>::InOut
) -> Result<Self, OutOfBounds>
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]
&mut self,
new_val: <bool as Specifier>::InOut
) -> Result<(), OutOfBounds>
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]
&self
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
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]
self,
new_val: <bool as Specifier>::InOut
) -> Result<Self, OutOfBounds>
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]
&mut self,
new_val: <bool as Specifier>::InOut
) -> Result<(), OutOfBounds>
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]
&self
) -> Result<<ControllerType as Specifier>::InOut, InvalidBitPattern<<ControllerType as Specifier>::Bytes>>
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]
self,
new_val: <ControllerType as Specifier>::InOut
) -> Self
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]
self,
new_val: <ControllerType as Specifier>::InOut
) -> Result<Self, OutOfBounds>
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]
&mut self,
new_val: <ControllerType as Specifier>::InOut
)
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]
&mut self,
new_val: <ControllerType as Specifier>::InOut
) -> Result<(), OutOfBounds>
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
pub fn read_options<R: Read + Seek>(
__binread_generated_var_reader: &mut R,
__binread_generated_var_options: &ReadOptions,
__binread_generated_var_arguments: Self::Args
) -> BinResult<Self>
[src]
__binread_generated_var_reader: &mut R,
__binread_generated_var_options: &ReadOptions,
__binread_generated_var_arguments: Self::Args
) -> BinResult<Self>
pub fn after_parse<R: Read + Seek>(
&mut self,
__binread_generated_var_reader: &mut R,
__binread_generated_var_options: &ReadOptions,
__binread_generated_var_arguments: Self::Args
) -> BinResult<()>
[src]
&mut self,
__binread_generated_var_reader: &mut R,
__binread_generated_var_options: &ReadOptions,
__binread_generated_var_arguments: Self::Args
) -> BinResult<()>
pub fn read<R>(reader: &mut R) -> Result<Self, Error> where
R: Read + Seek,
[src]
R: Read + Seek,
pub fn read_args<R>(reader: &mut R, args: Self::Args) -> Result<Self, Error> where
R: Read + Seek,
[src]
R: Read + Seek,
pub fn args_default() -> Option<Self::Args>
[src]
impl CheckTotalSizeMultipleOf8 for ControllerStatus
[src]
impl Clone for ControllerStatus
[src]
pub fn clone(&self) -> ControllerStatus
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for ControllerStatus
[src]
impl Debug for ControllerStatus
[src]
impl Default for ControllerStatus
[src]
pub fn default() -> ControllerStatus
[src]
impl PartialEq<ControllerStatus> for ControllerStatus
[src]
pub fn eq(&self, other: &ControllerStatus) -> bool
[src]
pub fn ne(&self, other: &ControllerStatus) -> bool
[src]
impl StructuralPartialEq for ControllerStatus
[src]
Auto Trait Implementations
impl RefUnwindSafe for ControllerStatus
impl Send for ControllerStatus
impl Sync for ControllerStatus
impl Unpin for ControllerStatus
impl UnwindSafe for ControllerStatus
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,
pub 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.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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>,