#[repr(C, align(1))]pub struct Details { /* private fields */ }
Expand description
Detailed status of the charger
Implementations§
Source§impl Details
impl Details
Sourcepub const fn into_bytes(self) -> [u8; 3]
pub const fn into_bytes(self) -> [u8; 3]
Sourcepub const fn from_bytes(bytes: [u8; 3]) -> Self
pub const fn from_bytes(bytes: [u8; 3]) -> Self
Converts the given bytes directly into the bitfield struct.
Source§impl Details
impl Details
Sourcepub fn sense(&self) -> <BatterySense as Specifier>::InOut
pub fn sense(&self) -> <BatterySense as Specifier>::InOut
Returns the value of sense.
Sourcepub fn sense_or_err(
&self,
) -> Result<<BatterySense as Specifier>::InOut, InvalidBitPattern<<BatterySense as Specifier>::Bytes>>
pub fn sense_or_err( &self, ) -> Result<<BatterySense as Specifier>::InOut, InvalidBitPattern<<BatterySense as Specifier>::Bytes>>
Returns the value of sense.
#Errors
If the returned value contains an invalid bit pattern for sense.
Sourcepub fn with_sense(self, new_val: <BatterySense as Specifier>::InOut) -> Self
pub fn with_sense(self, new_val: <BatterySense as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of sense set to the given value.
#Panics
If the given value is out of bounds for sense.
Sourcepub fn with_sense_checked(
self,
new_val: <BatterySense as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_sense_checked( self, new_val: <BatterySense as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of sense set to the given value.
#Errors
If the given value is out of bounds for sense.
Sourcepub fn set_sense(&mut self, new_val: <BatterySense as Specifier>::InOut)
pub fn set_sense(&mut self, new_val: <BatterySense as Specifier>::InOut)
Sets the value of sense to the given value.
#Panics
If the given value is out of bounds for sense.
Sourcepub fn set_sense_checked(
&mut self,
new_val: <BatterySense as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_sense_checked( &mut self, new_val: <BatterySense as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of sense to the given value.
#Errors
If the given value is out of bounds for sense.
Sourcepub fn chgin_or_err(
&self,
) -> Result<<ChgIn as Specifier>::InOut, InvalidBitPattern<<ChgIn as Specifier>::Bytes>>
pub fn chgin_or_err( &self, ) -> Result<<ChgIn as Specifier>::InOut, InvalidBitPattern<<ChgIn as Specifier>::Bytes>>
Returns the value of chgin.
#Errors
If the returned value contains an invalid bit pattern for chgin.
Sourcepub fn with_chgin(self, new_val: <ChgIn as Specifier>::InOut) -> Self
pub fn with_chgin(self, new_val: <ChgIn as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of chgin set to the given value.
#Panics
If the given value is out of bounds for chgin.
Sourcepub fn with_chgin_checked(
self,
new_val: <ChgIn as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_chgin_checked( self, new_val: <ChgIn as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of chgin set to the given value.
#Errors
If the given value is out of bounds for chgin.
Sourcepub fn set_chgin(&mut self, new_val: <ChgIn as Specifier>::InOut)
pub fn set_chgin(&mut self, new_val: <ChgIn as Specifier>::InOut)
Sets the value of chgin to the given value.
#Panics
If the given value is out of bounds for chgin.
Sourcepub fn set_chgin_checked(
&mut self,
new_val: <ChgIn as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_chgin_checked( &mut self, new_val: <ChgIn as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of chgin to the given value.
#Errors
If the given value is out of bounds for chgin.
Sourcepub fn charger(&self) -> <ChargerDetails as Specifier>::InOut
pub fn charger(&self) -> <ChargerDetails as Specifier>::InOut
Returns the value of charger.
Sourcepub fn charger_or_err(
&self,
) -> Result<<ChargerDetails as Specifier>::InOut, InvalidBitPattern<<ChargerDetails as Specifier>::Bytes>>
pub fn charger_or_err( &self, ) -> Result<<ChargerDetails as Specifier>::InOut, InvalidBitPattern<<ChargerDetails as Specifier>::Bytes>>
Returns the value of charger.
#Errors
If the returned value contains an invalid bit pattern for charger.
Sourcepub fn with_charger(self, new_val: <ChargerDetails as Specifier>::InOut) -> Self
pub fn with_charger(self, new_val: <ChargerDetails as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of charger set to the given value.
#Panics
If the given value is out of bounds for charger.
Sourcepub fn with_charger_checked(
self,
new_val: <ChargerDetails as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_charger_checked( self, new_val: <ChargerDetails as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of charger set to the given value.
#Errors
If the given value is out of bounds for charger.
Sourcepub fn set_charger(&mut self, new_val: <ChargerDetails as Specifier>::InOut)
pub fn set_charger(&mut self, new_val: <ChargerDetails as Specifier>::InOut)
Sets the value of charger to the given value.
#Panics
If the given value is out of bounds for charger.
Sourcepub fn set_charger_checked(
&mut self,
new_val: <ChargerDetails as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_charger_checked( &mut self, new_val: <ChargerDetails as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of charger to the given value.
#Errors
If the given value is out of bounds for charger.
Sourcepub fn battery(&self) -> <BatteryDetails as Specifier>::InOut
pub fn battery(&self) -> <BatteryDetails as Specifier>::InOut
Returns the value of battery.
Sourcepub fn battery_or_err(
&self,
) -> Result<<BatteryDetails as Specifier>::InOut, InvalidBitPattern<<BatteryDetails as Specifier>::Bytes>>
pub fn battery_or_err( &self, ) -> Result<<BatteryDetails as Specifier>::InOut, InvalidBitPattern<<BatteryDetails as Specifier>::Bytes>>
Returns the value of battery.
#Errors
If the returned value contains an invalid bit pattern for battery.
Sourcepub fn with_battery(self, new_val: <BatteryDetails as Specifier>::InOut) -> Self
pub fn with_battery(self, new_val: <BatteryDetails as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of battery set to the given value.
#Panics
If the given value is out of bounds for battery.
Sourcepub fn with_battery_checked(
self,
new_val: <BatteryDetails as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_battery_checked( self, new_val: <BatteryDetails as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of battery set to the given value.
#Errors
If the given value is out of bounds for battery.
Sourcepub fn set_battery(&mut self, new_val: <BatteryDetails as Specifier>::InOut)
pub fn set_battery(&mut self, new_val: <BatteryDetails as Specifier>::InOut)
Sets the value of battery to the given value.
#Panics
If the given value is out of bounds for battery.
Sourcepub fn set_battery_checked(
&mut self,
new_val: <BatteryDetails as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_battery_checked( &mut self, new_val: <BatteryDetails as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of battery to the given value.
#Errors
If the given value is out of bounds for battery.
Sourcepub fn temp(&self) -> <TemperatureRegulation as Specifier>::InOut
pub fn temp(&self) -> <TemperatureRegulation as Specifier>::InOut
Returns the value of temp.
Sourcepub fn temp_or_err(
&self,
) -> Result<<TemperatureRegulation as Specifier>::InOut, InvalidBitPattern<<TemperatureRegulation as Specifier>::Bytes>>
pub fn temp_or_err( &self, ) -> Result<<TemperatureRegulation as Specifier>::InOut, InvalidBitPattern<<TemperatureRegulation as Specifier>::Bytes>>
Returns the value of temp.
#Errors
If the returned value contains an invalid bit pattern for temp.
Sourcepub fn with_temp(
self,
new_val: <TemperatureRegulation as Specifier>::InOut,
) -> Self
pub fn with_temp( self, new_val: <TemperatureRegulation as Specifier>::InOut, ) -> Self
Returns a copy of the bitfield with the value of temp set to the given value.
#Panics
If the given value is out of bounds for temp.
Sourcepub fn with_temp_checked(
self,
new_val: <TemperatureRegulation as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_temp_checked( self, new_val: <TemperatureRegulation as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of temp set to the given value.
#Errors
If the given value is out of bounds for temp.
Sourcepub fn set_temp(&mut self, new_val: <TemperatureRegulation as Specifier>::InOut)
pub fn set_temp(&mut self, new_val: <TemperatureRegulation as Specifier>::InOut)
Sets the value of temp to the given value.
#Panics
If the given value is out of bounds for temp.
Sourcepub fn set_temp_checked(
&mut self,
new_val: <TemperatureRegulation as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_temp_checked( &mut self, new_val: <TemperatureRegulation as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of temp to the given value.
#Errors
If the given value is out of bounds for temp.
Sourcepub fn bypass(&self) -> <BypassNodeDetails as Specifier>::InOut
pub fn bypass(&self) -> <BypassNodeDetails as Specifier>::InOut
Returns the value of bypass.
Sourcepub fn bypass_or_err(
&self,
) -> Result<<BypassNodeDetails as Specifier>::InOut, InvalidBitPattern<<BypassNodeDetails as Specifier>::Bytes>>
pub fn bypass_or_err( &self, ) -> Result<<BypassNodeDetails as Specifier>::InOut, InvalidBitPattern<<BypassNodeDetails as Specifier>::Bytes>>
Returns the value of bypass.
#Errors
If the returned value contains an invalid bit pattern for bypass.
Sourcepub fn with_bypass(
self,
new_val: <BypassNodeDetails as Specifier>::InOut,
) -> Self
pub fn with_bypass( self, new_val: <BypassNodeDetails as Specifier>::InOut, ) -> Self
Returns a copy of the bitfield with the value of bypass set to the given value.
#Panics
If the given value is out of bounds for bypass.
Sourcepub fn with_bypass_checked(
self,
new_val: <BypassNodeDetails as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_bypass_checked( self, new_val: <BypassNodeDetails as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of bypass set to the given value.
#Errors
If the given value is out of bounds for bypass.
Sourcepub fn set_bypass(&mut self, new_val: <BypassNodeDetails as Specifier>::InOut)
pub fn set_bypass(&mut self, new_val: <BypassNodeDetails as Specifier>::InOut)
Sets the value of bypass to the given value.
#Panics
If the given value is out of bounds for bypass.
Sourcepub fn set_bypass_checked(
&mut self,
new_val: <BypassNodeDetails as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_bypass_checked( &mut self, new_val: <BypassNodeDetails as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of bypass to the given value.
#Errors
If the given value is out of bounds for bypass.
Sourcepub fn thermistor(&self) -> <ThermistorDetails as Specifier>::InOut
pub fn thermistor(&self) -> <ThermistorDetails as Specifier>::InOut
Returns the value of thermistor.
Sourcepub fn thermistor_or_err(
&self,
) -> Result<<ThermistorDetails as Specifier>::InOut, InvalidBitPattern<<ThermistorDetails as Specifier>::Bytes>>
pub fn thermistor_or_err( &self, ) -> Result<<ThermistorDetails as Specifier>::InOut, InvalidBitPattern<<ThermistorDetails as Specifier>::Bytes>>
Returns the value of thermistor.
#Errors
If the returned value contains an invalid bit pattern for thermistor.
Sourcepub fn with_thermistor(
self,
new_val: <ThermistorDetails as Specifier>::InOut,
) -> Self
pub fn with_thermistor( self, new_val: <ThermistorDetails as Specifier>::InOut, ) -> Self
Returns a copy of the bitfield with the value of thermistor set to the given value.
#Panics
If the given value is out of bounds for thermistor.
Sourcepub fn with_thermistor_checked(
self,
new_val: <ThermistorDetails as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_thermistor_checked( self, new_val: <ThermistorDetails as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of thermistor set to the given value.
#Errors
If the given value is out of bounds for thermistor.
Sourcepub fn set_thermistor(
&mut self,
new_val: <ThermistorDetails as Specifier>::InOut,
)
pub fn set_thermistor( &mut self, new_val: <ThermistorDetails as Specifier>::InOut, )
Sets the value of thermistor to the given value.
#Panics
If the given value is out of bounds for thermistor.
Sourcepub fn set_thermistor_checked(
&mut self,
new_val: <ThermistorDetails as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_thermistor_checked( &mut self, new_val: <ThermistorDetails as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of thermistor to the given value.
#Errors
If the given value is out of bounds for thermistor.