Struct fidl_fuchsia_power_broker::ElementSchema
source · pub struct ElementSchema {
pub element_name: Option<String>,
pub initial_current_level: Option<u8>,
pub valid_levels: Option<Vec<u8>>,
pub dependencies: Option<Vec<LevelDependency>>,
pub active_dependency_tokens_to_register: Option<Vec<Event>>,
pub passive_dependency_tokens_to_register: Option<Vec<Event>>,
pub level_control_channels: Option<LevelControlChannels>,
pub lessor_channel: Option<ServerEnd<LessorMarker>>,
/* private fields */
}
Expand description
Passed to Topology.AddElement.
Fields§
§element_name: Option<String>
Human-readable name for logging and debug purposes.
initial_current_level: Option<u8>
The initial current power level of the element.
valid_levels: Option<Vec<u8>>
All power levels that are valid for this element. Any level not specified here will be treated as invalid.
dependencies: Option<Vec<LevelDependency>>
List of dependencies for this element’s power levels. Note: dependencies UPON this element’s levels cannot be added here.
active_dependency_tokens_to_register: Option<Vec<Event>>
List of active dependency tokens to register for this element. These tokens will allow other element owners to create active dependencies upon this element by passing them as the requires_token of a LevelDependency.
passive_dependency_tokens_to_register: Option<Vec<Event>>
List of passive dependency tokens to register for this element. These tokens will allow other element owners to create passive dependencies upon this element by passing them as the requires_token of a LevelDependency.
level_control_channels: Option<LevelControlChannels>
Channels on which Power Broker will send required power levels and receive current level updates.
lessor_channel: Option<ServerEnd<LessorMarker>>
Optional. If passed, this will be treated as a consumer element and Leases for this element can be requested via this channel.
Trait Implementations§
source§impl Debug for ElementSchema
impl Debug for ElementSchema
source§impl Decode<ElementSchema> for ElementSchema
impl Decode<ElementSchema> for ElementSchema
source§impl Default for ElementSchema
impl Default for ElementSchema
source§fn default() -> ElementSchema
fn default() -> ElementSchema
source§impl Encode<ElementSchema> for &mut ElementSchema
impl Encode<ElementSchema> for &mut ElementSchema
source§impl PartialEq for ElementSchema
impl PartialEq for ElementSchema
source§fn eq(&self, other: &ElementSchema) -> bool
fn eq(&self, other: &ElementSchema) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl ResourceTypeMarker for ElementSchema
impl ResourceTypeMarker for ElementSchema
§type Borrowed<'a> = &'a mut ElementSchema
type Borrowed<'a> = &'a mut ElementSchema
Encode<Self>
type cheaply obtainable from &mut Self::Owned
. There are three cases: Read moresource§fn take_or_borrow<'a>(
value: &'a mut <Self as TypeMarker>::Owned
) -> Self::Borrowed<'a>
fn take_or_borrow<'a>( value: &'a mut <Self as TypeMarker>::Owned ) -> Self::Borrowed<'a>
&mut Self::Owned
to Self::Borrowed
. For
HandleBased
types this is “take” (it returns an owned handle and
replaces value
with Handle::invalid
), and for all other types it is
“borrow” (just converts from one reference to another).source§impl TypeMarker for ElementSchema
impl TypeMarker for ElementSchema
§type Owned = ElementSchema
type Owned = ElementSchema
source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read more§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.