Struct usb_pd::messages::pdo::VariableSupply
source · pub struct VariableSupply(pub u32);
Tuple Fields§
§0: u32
Implementations§
source§impl VariableSupply
impl VariableSupply
sourcepub fn raw_max_voltage(&self) -> u16
pub fn raw_max_voltage(&self) -> u16
Maximum Voltage in 50mV units
sourcepub fn with_raw_max_voltage(self, value: u16) -> Self
pub fn with_raw_max_voltage(self, value: u16) -> Self
Maximum Voltage in 50mV units
sourcepub fn set_raw_max_voltage(&mut self, value: u16)
pub fn set_raw_max_voltage(&mut self, value: u16)
Maximum Voltage in 50mV units
sourcepub fn raw_min_voltage(&self) -> u16
pub fn raw_min_voltage(&self) -> u16
Minimum Voltage in 50mV units
sourcepub fn with_raw_min_voltage(self, value: u16) -> Self
pub fn with_raw_min_voltage(self, value: u16) -> Self
Minimum Voltage in 50mV units
sourcepub fn set_raw_min_voltage(&mut self, value: u16)
pub fn set_raw_min_voltage(&mut self, value: u16)
Minimum 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 VariableSupply
impl VariableSupply
pub fn max_voltage(&self) -> ElectricPotential
pub fn min_voltage(&self) -> ElectricPotential
pub fn max_current(&self) -> ElectricCurrent
Trait Implementations§
source§impl Clone for VariableSupply
impl Clone for VariableSupply
source§fn clone(&self) -> VariableSupply
fn clone(&self) -> VariableSupply
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for VariableSupply
impl Debug for VariableSupply
source§impl Format for VariableSupply
impl Format for VariableSupply
source§impl From<VariableSupply> for u32
impl From<VariableSupply> for u32
source§fn from(other: VariableSupply) -> Self
fn from(other: VariableSupply) -> Self
Converts to this type from the input type.
source§impl From<u32> for VariableSupply
impl From<u32> for VariableSupply
source§impl PartialEq for VariableSupply
impl PartialEq for VariableSupply
source§fn eq(&self, other: &VariableSupply) -> bool
fn eq(&self, other: &VariableSupply) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for VariableSupply
impl Eq for VariableSupply
impl StructuralPartialEq for VariableSupply
Auto Trait Implementations§
impl Freeze for VariableSupply
impl RefUnwindSafe for VariableSupply
impl Send for VariableSupply
impl Sync for VariableSupply
impl Unpin for VariableSupply
impl UnwindSafe for VariableSupply
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
Mutably borrows from an owned value. Read more
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.