Struct usb_pd::messages::pdo::BatteryRequestDataObject
source · pub struct BatteryRequestDataObject(pub u32);
Tuple Fields§
§0: u32
Implementations§
source§impl BatteryRequestDataObject
impl BatteryRequestDataObject
sourcepub fn object_position(&self) -> u8
pub fn object_position(&self) -> u8
Object position (0000b and 1110b…1111b are Reserved and Shall Not be used)
sourcepub fn with_object_position(self, value: u8) -> Self
pub fn with_object_position(self, value: u8) -> Self
Object position (0000b and 1110b…1111b are Reserved and Shall Not be used)
sourcepub fn set_object_position(&mut self, value: u8)
pub fn set_object_position(&mut self, value: u8)
Object position (0000b and 1110b…1111b are Reserved and Shall Not be used)
sourcepub fn giveback_flag(&self) -> bool
pub fn giveback_flag(&self) -> bool
GiveBackFlag = 0
sourcepub fn with_giveback_flag(self, value: bool) -> Self
pub fn with_giveback_flag(self, value: bool) -> Self
GiveBackFlag = 0
sourcepub fn set_giveback_flag(&mut self, value: bool)
pub fn set_giveback_flag(&mut self, value: bool)
GiveBackFlag = 0
sourcepub fn capability_mismatch(&self) -> bool
pub fn capability_mismatch(&self) -> bool
Capability mismatch
sourcepub fn with_capability_mismatch(self, value: bool) -> Self
pub fn with_capability_mismatch(self, value: bool) -> Self
Capability mismatch
sourcepub fn set_capability_mismatch(&mut self, value: bool)
pub fn set_capability_mismatch(&mut self, value: bool)
Capability mismatch
sourcepub fn usb_communications_capable(&self) -> bool
pub fn usb_communications_capable(&self) -> bool
USB communications capable
sourcepub fn with_usb_communications_capable(self, value: bool) -> Self
pub fn with_usb_communications_capable(self, value: bool) -> Self
USB communications capable
sourcepub fn set_usb_communications_capable(&mut self, value: bool)
pub fn set_usb_communications_capable(&mut self, value: bool)
USB communications capable
sourcepub fn no_usb_suspend(&self) -> bool
pub fn no_usb_suspend(&self) -> bool
No USB Suspend
sourcepub fn with_no_usb_suspend(self, value: bool) -> Self
pub fn with_no_usb_suspend(self, value: bool) -> Self
No USB Suspend
sourcepub fn set_no_usb_suspend(&mut self, value: bool)
pub fn set_no_usb_suspend(&mut self, value: bool)
No USB Suspend
sourcepub fn unchunked_extended_messages_supported(&self) -> bool
pub fn unchunked_extended_messages_supported(&self) -> bool
Unchunked extended messages supported
sourcepub fn with_unchunked_extended_messages_supported(self, value: bool) -> Self
pub fn with_unchunked_extended_messages_supported(self, value: bool) -> Self
Unchunked extended messages supported
sourcepub fn set_unchunked_extended_messages_supported(&mut self, value: bool)
pub fn set_unchunked_extended_messages_supported(&mut self, value: bool)
Unchunked extended messages supported
sourcepub fn epr_mode_capable(&self) -> bool
pub fn epr_mode_capable(&self) -> bool
EPR mode capable
sourcepub fn with_epr_mode_capable(self, value: bool) -> Self
pub fn with_epr_mode_capable(self, value: bool) -> Self
EPR mode capable
sourcepub fn set_epr_mode_capable(&mut self, value: bool)
pub fn set_epr_mode_capable(&mut self, value: bool)
EPR mode capable
sourcepub fn raw_operating_power(&self) -> u16
pub fn raw_operating_power(&self) -> u16
Operating power in 250mW units
sourcepub fn with_raw_operating_power(self, value: u16) -> Self
pub fn with_raw_operating_power(self, value: u16) -> Self
Operating power in 250mW units
sourcepub fn set_raw_operating_power(&mut self, value: u16)
pub fn set_raw_operating_power(&mut self, value: u16)
Operating power in 250mW units
sourcepub fn raw_max_operating_power(&self) -> u16
pub fn raw_max_operating_power(&self) -> u16
Maximum operating power in 250mW units
sourcepub fn with_raw_max_operating_power(self, value: u16) -> Self
pub fn with_raw_max_operating_power(self, value: u16) -> Self
Maximum operating power in 250mW units
sourcepub fn set_raw_max_operating_power(&mut self, value: u16)
pub fn set_raw_max_operating_power(&mut self, value: u16)
Maximum operating power in 250mW units
source§impl BatteryRequestDataObject
impl BatteryRequestDataObject
pub fn to_bytes(&self, buf: &mut [u8])
pub fn operating_power(&self) -> Power
pub fn max_operating_power(&self) -> Power
Trait Implementations§
source§impl Clone for BatteryRequestDataObject
impl Clone for BatteryRequestDataObject
source§fn clone(&self) -> BatteryRequestDataObject
fn clone(&self) -> BatteryRequestDataObject
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for BatteryRequestDataObject
impl Debug for BatteryRequestDataObject
source§impl Format for BatteryRequestDataObject
impl Format for BatteryRequestDataObject
source§impl From<BatteryRequestDataObject> for u32
impl From<BatteryRequestDataObject> for u32
source§fn from(other: BatteryRequestDataObject) -> Self
fn from(other: BatteryRequestDataObject) -> Self
source§impl From<u32> for BatteryRequestDataObject
impl From<u32> for BatteryRequestDataObject
source§impl PartialEq for BatteryRequestDataObject
impl PartialEq for BatteryRequestDataObject
source§fn eq(&self, other: &BatteryRequestDataObject) -> bool
fn eq(&self, other: &BatteryRequestDataObject) -> bool
self
and other
values to be equal, and is used
by ==
.impl Copy for BatteryRequestDataObject
impl Eq for BatteryRequestDataObject
impl StructuralPartialEq for BatteryRequestDataObject
Auto Trait Implementations§
impl Freeze for BatteryRequestDataObject
impl RefUnwindSafe for BatteryRequestDataObject
impl Send for BatteryRequestDataObject
impl Sync for BatteryRequestDataObject
impl Unpin for BatteryRequestDataObject
impl UnwindSafe for BatteryRequestDataObject
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T, U> UnsafeFrom<U> for Twhere
U: Into<T>,
impl<T, U> UnsafeFrom<U> for Twhere
U: Into<T>,
source§unsafe fn unsafe_from(other: U) -> T
unsafe fn unsafe_from(other: U) -> T
Calls U::into(other)
.
That is, this conversion is whatever the implementation of Into
<T> for U
chooses to
do.
source§impl<T, U> UnsafeInto<U> for Twhere
U: UnsafeFrom<T>,
impl<T, U> UnsafeInto<U> for Twhere
U: UnsafeFrom<T>,
source§unsafe fn unsafe_into(self) -> U
unsafe fn unsafe_into(self) -> U
Calls U::unsafe_from(self)
.
That is, this conversion is whatever the implementation of UnsafeFrom
<T> for U
chooses to do.