Struct usb_pd::messages::pdo::FixedSupply
source · pub struct FixedSupply(pub u32);
Tuple Fields§
§0: u32
Implementations§
source§impl FixedSupply
impl FixedSupply
sourcepub fn dual_role_power(&self) -> bool
pub fn dual_role_power(&self) -> bool
Dual-role power
sourcepub fn with_dual_role_power(self, value: bool) -> Self
pub fn with_dual_role_power(self, value: bool) -> Self
Dual-role power
sourcepub fn set_dual_role_power(&mut self, value: bool)
pub fn set_dual_role_power(&mut self, value: bool)
Dual-role power
sourcepub fn usb_suspend_supported(&self) -> bool
pub fn usb_suspend_supported(&self) -> bool
USB suspend supported
sourcepub fn with_usb_suspend_supported(self, value: bool) -> Self
pub fn with_usb_suspend_supported(self, value: bool) -> Self
USB suspend supported
sourcepub fn set_usb_suspend_supported(&mut self, value: bool)
pub fn set_usb_suspend_supported(&mut self, value: bool)
USB suspend supported
sourcepub fn unconstrained_power(&self) -> bool
pub fn unconstrained_power(&self) -> bool
Unconstrained power
sourcepub fn with_unconstrained_power(self, value: bool) -> Self
pub fn with_unconstrained_power(self, value: bool) -> Self
Unconstrained power
sourcepub fn set_unconstrained_power(&mut self, value: bool)
pub fn set_unconstrained_power(&mut self, value: bool)
Unconstrained power
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 dual_role_data(&self) -> bool
pub fn dual_role_data(&self) -> bool
Dual-role data
sourcepub fn with_dual_role_data(self, value: bool) -> Self
pub fn with_dual_role_data(self, value: bool) -> Self
Dual-role data
sourcepub fn set_dual_role_data(&mut self, value: bool)
pub fn set_dual_role_data(&mut self, value: bool)
Dual-role data
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 peak_current(&self) -> u8
pub fn peak_current(&self) -> u8
Peak current
sourcepub fn with_peak_current(self, value: u8) -> Self
pub fn with_peak_current(self, value: u8) -> Self
Peak current
sourcepub fn set_peak_current(&mut self, value: u8)
pub fn set_peak_current(&mut self, value: u8)
Peak current
sourcepub fn raw_voltage(&self) -> u16
pub fn raw_voltage(&self) -> u16
Voltage in 50mV units
sourcepub fn with_raw_voltage(self, value: u16) -> Self
pub fn with_raw_voltage(self, value: u16) -> Self
Voltage in 50mV units
sourcepub fn set_raw_voltage(&mut self, value: u16)
pub fn set_raw_voltage(&mut self, value: u16)
Voltage in 50mV units
sourcepub fn raw_max_current(&self) -> u16
pub fn raw_max_current(&self) -> u16
Maximum current in 10mA units
sourcepub fn with_raw_max_current(self, value: u16) -> Self
pub fn with_raw_max_current(self, value: u16) -> Self
Maximum current in 10mA units
sourcepub fn set_raw_max_current(&mut self, value: u16)
pub fn set_raw_max_current(&mut self, value: u16)
Maximum current in 10mA units
source§impl FixedSupply
impl FixedSupply
pub fn voltage(&self) -> ElectricPotential
pub fn max_current(&self) -> ElectricCurrent
Trait Implementations§
source§impl Clone for FixedSupply
impl Clone for FixedSupply
source§fn clone(&self) -> FixedSupply
fn clone(&self) -> FixedSupply
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for FixedSupply
impl Debug for FixedSupply
source§impl Format for FixedSupply
impl Format for FixedSupply
source§impl From<FixedSupply> for u32
impl From<FixedSupply> for u32
source§fn from(other: FixedSupply) -> Self
fn from(other: FixedSupply) -> Self
source§impl From<u32> for FixedSupply
impl From<u32> for FixedSupply
source§impl PartialEq for FixedSupply
impl PartialEq for FixedSupply
source§fn eq(&self, other: &FixedSupply) -> bool
fn eq(&self, other: &FixedSupply) -> bool
self
and other
values to be equal, and is used
by ==
.impl Copy for FixedSupply
impl Eq for FixedSupply
impl StructuralPartialEq for FixedSupply
Auto Trait Implementations§
impl Freeze for FixedSupply
impl RefUnwindSafe for FixedSupply
impl Send for FixedSupply
impl Sync for FixedSupply
impl Unpin for FixedSupply
impl UnwindSafe for FixedSupply
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.