pub struct PowerLevel {
pub level: Option<u8>,
pub name: Option<String>,
pub transitions: Option<Vec<Transition>>,
}Expand description
A zero-indexed set of levels that a device can assume.
levelis the zero-indexed level of thisPowerLevel.nameis a human-readable label for thisPowerLevel, used only for debugging.transitionsdescribes the levels that are valid transitions from thisPowerLevel.
Fields§
§level: Option<u8>§name: Option<String>§transitions: Option<Vec<Transition>>Trait Implementations§
Source§impl Clone for PowerLevel
impl Clone for PowerLevel
Source§fn clone(&self) -> PowerLevel
fn clone(&self) -> PowerLevel
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PowerLevel
impl Debug for PowerLevel
Source§impl Default for PowerLevel
impl Default for PowerLevel
Source§fn default() -> PowerLevel
fn default() -> PowerLevel
Returns the “default value” for a type. Read more
Source§impl<'a, ___E> Encode<PowerLevel<'static>, ___E> for &'a PowerLevelwhere
___E: Encoder + ?Sized,
impl<'a, ___E> Encode<PowerLevel<'static>, ___E> for &'a PowerLevelwhere
___E: Encoder + ?Sized,
Source§fn encode(
self,
encoder: &mut ___E,
out: &mut MaybeUninit<PowerLevel<'static>>,
_: (),
) -> Result<(), EncodeError>
fn encode( self, encoder: &mut ___E, out: &mut MaybeUninit<PowerLevel<'static>>, _: (), ) -> Result<(), EncodeError>
Encodes this value into an encoder and output.
§const COPY_OPTIMIZATION: CopyOptimization<Self, W> = _
const COPY_OPTIMIZATION: CopyOptimization<Self, W> = _
Source§impl<___E> Encode<PowerLevel<'static>, ___E> for PowerLevelwhere
___E: Encoder + ?Sized,
impl<___E> Encode<PowerLevel<'static>, ___E> for PowerLevelwhere
___E: Encoder + ?Sized,
Source§fn encode(
self,
encoder: &mut ___E,
out: &mut MaybeUninit<PowerLevel<'static>>,
_: (),
) -> Result<(), EncodeError>
fn encode( self, encoder: &mut ___E, out: &mut MaybeUninit<PowerLevel<'static>>, _: (), ) -> Result<(), EncodeError>
Encodes this value into an encoder and output.
§const COPY_OPTIMIZATION: CopyOptimization<Self, W> = _
const COPY_OPTIMIZATION: CopyOptimization<Self, W> = _
Source§impl<'de> FromWire<PowerLevel<'de>> for PowerLevel
impl<'de> FromWire<PowerLevel<'de>> for PowerLevel
Source§fn from_wire(wire_: PowerLevel<'de>) -> PowerLevel
fn from_wire(wire_: PowerLevel<'de>) -> PowerLevel
Converts the given owned value to this type.
§const COPY_OPTIMIZATION: CopyOptimization<W, Self> = _
const COPY_OPTIMIZATION: CopyOptimization<W, Self> = _
Source§impl<'de> FromWireRef<PowerLevel<'de>> for PowerLevel
impl<'de> FromWireRef<PowerLevel<'de>> for PowerLevel
Source§fn from_wire_ref(wire: &PowerLevel<'de>) -> PowerLevel
fn from_wire_ref(wire: &PowerLevel<'de>) -> PowerLevel
Converts the given reference to this type.
Source§impl Hash for PowerLevel
impl Hash for PowerLevel
Source§impl Ord for PowerLevel
impl Ord for PowerLevel
Source§fn cmp(&self, other: &PowerLevel) -> Ordering
fn cmp(&self, other: &PowerLevel) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for PowerLevel
impl PartialEq for PowerLevel
Source§fn eq(&self, other: &PowerLevel) -> bool
fn eq(&self, other: &PowerLevel) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for PowerLevel
impl PartialOrd for PowerLevel
impl Eq for PowerLevel
impl StructuralPartialEq for PowerLevel
Auto Trait Implementations§
impl Freeze for PowerLevel
impl RefUnwindSafe for PowerLevel
impl Send for PowerLevel
impl Sync for PowerLevel
impl Unpin for PowerLevel
impl UnsafeUnpin for PowerLevel
impl UnwindSafe for PowerLevel
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, W> FromWireOption<Box<'_, W>> for Twhere
T: FromWire<W>,
impl<T, W> FromWireOption<Box<'_, W>> for Twhere
T: FromWire<W>,
§fn from_wire_option(wire: Box<'_, W>) -> Option<T>
fn from_wire_option(wire: Box<'_, W>) -> Option<T>
Converts the given owned value to an option of this type.
§impl<T, W> FromWireOptionRef<Box<'_, W>> for Twhere
T: FromWireRef<W>,
impl<T, W> FromWireOptionRef<Box<'_, W>> for Twhere
T: FromWireRef<W>,
§fn from_wire_option_ref(wire: &Box<'_, W>) -> Option<T>
fn from_wire_option_ref(wire: &Box<'_, W>) -> Option<T>
Converts the given reference to an option of this type.
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
Converts the given service transport handle of type
T to [Self]