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 level_control_channels: Option<LevelControlChannels>,
pub lessor_channel: Option<ServerEnd<LessorMarker>>,
pub element_control: Option<ServerEnd<ElementControlMarker>>,
/* 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.
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.
element_control: Option<ServerEnd<ElementControlMarker>>
Caller-provided ElementControl channel to be passed to Power Broker. When this channel is dropped, the element will be removed from the topology. All channels associated with this element will be closed and all tokens registered to this element will be unregistered.
Trait Implementations§
Source§impl Debug for ElementSchema
impl Debug for ElementSchema
Source§impl Decode<ElementSchema, DefaultFuchsiaResourceDialect> for ElementSchema
impl Decode<ElementSchema, DefaultFuchsiaResourceDialect> for ElementSchema
Source§impl Default for ElementSchema
impl Default for ElementSchema
Source§fn default() -> ElementSchema
fn default() -> ElementSchema
Source§impl Encode<ElementSchema, DefaultFuchsiaResourceDialect> for &mut ElementSchema
impl Encode<ElementSchema, DefaultFuchsiaResourceDialect> for &mut ElementSchema
Source§impl PartialEq for ElementSchema
impl PartialEq for ElementSchema
Source§impl ResourceTypeMarker for ElementSchema
impl ResourceTypeMarker for ElementSchema
Source§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
Source§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.