pub struct LevelDependency {
pub dependent_level: Option<u8>,
pub requires_token: Option<Event>,
pub requires_level_by_preference: Option<Vec<u8>>,
pub remove_with_required_element: Option<bool>,
}Expand description
Describes a dependency from one power element’s level on another power
element’s level.
For example if element PowerElement_A has a level PowerLevel_A3 which
depends on an element PowerElement_B being at PowerLevel_B2 then we would
fill out the struct to convey the meaning:
dependent_level=PowerLevel_A3requires_token=PowerElement_Brequires_level_by_preference=[PowerLevel_B2](Note the values above are only symbolic, eg.dependent_levelrequires an integer value, not a string.)
The dependent Element’s identity is not specified in this struct and must be specified as a separate argument in a request or be inferred, perhaps because a channel is scoped to the dependent element.
Fields§
§dependent_level: Option<u8>§requires_token: Option<Event>§requires_level_by_preference: Option<Vec<u8>>§remove_with_required_element: Option<bool>Trait Implementations§
Source§impl Debug for LevelDependency
impl Debug for LevelDependency
Source§impl Default for LevelDependency
impl Default for LevelDependency
Source§fn default() -> LevelDependency
fn default() -> LevelDependency
Returns the “default value” for a type. Read more
Source§impl<___E> Encode<LevelDependency<'static>, ___E> for LevelDependencywhere
___E: Encoder + ?Sized + HandleEncoder,
impl<___E> Encode<LevelDependency<'static>, ___E> for LevelDependencywhere
___E: Encoder + ?Sized + HandleEncoder,
Source§fn encode(
self,
encoder: &mut ___E,
out: &mut MaybeUninit<LevelDependency<'static>>,
_: (),
) -> Result<(), EncodeError>
fn encode( self, encoder: &mut ___E, out: &mut MaybeUninit<LevelDependency<'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<LevelDependency<'de>> for LevelDependency
impl<'de> FromWire<LevelDependency<'de>> for LevelDependency
Source§fn from_wire(wire_: LevelDependency<'de>) -> Self
fn from_wire(wire_: LevelDependency<'de>) -> Self
Converts the given owned value to this type.
§const COPY_OPTIMIZATION: CopyOptimization<W, Self> = _
const COPY_OPTIMIZATION: CopyOptimization<W, Self> = _
Source§impl PartialEq for LevelDependency
impl PartialEq for LevelDependency
Source§fn eq(&self, other: &LevelDependency) -> bool
fn eq(&self, other: &LevelDependency) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for LevelDependency
Auto Trait Implementations§
impl Freeze for LevelDependency
impl RefUnwindSafe for LevelDependency
impl Send for LevelDependency
impl Sync for LevelDependency
impl Unpin for LevelDependency
impl UnsafeUnpin for LevelDependency
impl UnwindSafe for LevelDependency
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
§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> 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]