pub struct ControllerStatus { /* private fields */ }
Expand description
Status of controller for the given port
Implementations§
Source§impl ControllerStatus
impl ControllerStatus
Sourcepub const fn into_bytes(self) -> [u8; 1]
pub const fn into_bytes(self) -> [u8; 1]
Sourcepub const fn from_bytes(bytes: [u8; 1]) -> Self
pub const fn from_bytes(bytes: [u8; 1]) -> Self
Converts the given bytes directly into the bitfield struct.
Source§impl ControllerStatus
impl ControllerStatus
Sourcepub fn unk_or_err(
&self,
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn unk_or_err( &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.
Sourcepub fn with_unk(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_unk(self, new_val: <bool as Specifier>::InOut) -> Self
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.
Sourcepub fn with_unk_checked(
self,
new_val: <bool as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_unk_checked( 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.
Sourcepub fn set_unk(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_unk(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of unk to the given value.
#Panics
If the given value is out of bounds for unk.
Sourcepub fn set_unk_checked(
&mut self,
new_val: <bool as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_unk_checked( &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.
Sourcepub fn unk2_or_err(
&self,
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn unk2_or_err( &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.
Sourcepub fn with_unk2(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_unk2(self, new_val: <bool as Specifier>::InOut) -> Self
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.
Sourcepub fn with_unk2_checked(
self,
new_val: <bool as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_unk2_checked( 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.
Sourcepub fn set_unk2(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_unk2(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of unk2 to the given value.
#Panics
If the given value is out of bounds for unk2.
Sourcepub fn set_unk2_checked(
&mut self,
new_val: <bool as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_unk2_checked( &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.
Sourcepub fn has_rumble(&self) -> <bool as Specifier>::InOut
pub fn has_rumble(&self) -> <bool as Specifier>::InOut
Returns the value of has_rumble.
Sourcepub fn has_rumble_or_err(
&self,
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn has_rumble_or_err( &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.
Sourcepub fn with_has_rumble(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_has_rumble(self, new_val: <bool as Specifier>::InOut) -> Self
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.
Sourcepub fn with_has_rumble_checked(
self,
new_val: <bool as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_has_rumble_checked( 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.
Sourcepub fn set_has_rumble(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_has_rumble(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of has_rumble to the given value.
#Panics
If the given value is out of bounds for has_rumble.
Sourcepub fn set_has_rumble_checked(
&mut self,
new_val: <bool as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_has_rumble_checked( &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.
Sourcepub fn unk3_or_err(
&self,
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn unk3_or_err( &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.
Sourcepub fn with_unk3(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_unk3(self, new_val: <bool as Specifier>::InOut) -> Self
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.
Sourcepub fn with_unk3_checked(
self,
new_val: <bool as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_unk3_checked( 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.
Sourcepub fn set_unk3(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_unk3(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of unk3 to the given value.
#Panics
If the given value is out of bounds for unk3.
Sourcepub fn set_unk3_checked(
&mut self,
new_val: <bool as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_unk3_checked( &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.
Sourcepub fn controller_type(&self) -> <ControllerType as Specifier>::InOut
pub fn controller_type(&self) -> <ControllerType as Specifier>::InOut
Returns the value of controller_type.
Sourcepub fn controller_type_or_err(
&self,
) -> Result<<ControllerType as Specifier>::InOut, InvalidBitPattern<<ControllerType as Specifier>::Bytes>>
pub fn controller_type_or_err( &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.
Sourcepub fn with_controller_type(
self,
new_val: <ControllerType as Specifier>::InOut,
) -> Self
pub fn with_controller_type( 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.
Sourcepub fn with_controller_type_checked(
self,
new_val: <ControllerType as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_controller_type_checked( 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.
Sourcepub fn set_controller_type(
&mut self,
new_val: <ControllerType as Specifier>::InOut,
)
pub fn set_controller_type( &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.
Sourcepub fn set_controller_type_checked(
&mut self,
new_val: <ControllerType as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_controller_type_checked( &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§
Source§impl BinRead for ControllerStatus
impl BinRead for ControllerStatus
Source§type Args = ()
type Args = ()
Source§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>
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>
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<()>
Source§fn read<R>(reader: &mut R) -> Result<Self, Error>
fn read<R>(reader: &mut R) -> Result<Self, Error>
Source§impl Clone for ControllerStatus
impl Clone for ControllerStatus
Source§fn clone(&self) -> ControllerStatus
fn clone(&self) -> ControllerStatus
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more