Re-exports§
pub use self::natural::*;
Modules§
- compat
- Compatibility shims which mimic some API surfaces of the current Rust bindings.
- element_
control - element_
info_ provider - element_
runner - generic
- lease_
control - lessor
- natural
- status
- topology
- wire
- wire_
optional
Structs§
- Element
Control - The type corresponding to the ElementControl protocol. Provides element-scoped access to an element previously added via Topology.AddElement.
- Element
Control Register Dependency Token Response - Element
Control Unregister Dependency Token Response - Element
Info Provider - The type corresponding to the ElementInfoProvider protocol. Provides an interface to retrieve information about PowerElements managed by a component.
- Element
Info Provider Service - The type corresponding to the ElementInfoProviderService service.
- Element
Info Provider Service Connector - A strongly-typed service connector for the
ElementInfoProviderServiceservice. - Element
Power Level Names - Mapping of a vector of [
fuchsia.power.broker/PowerLevelName] to a Power Element via its plaintext name. Names are expected to be unique between elements and persistent across reboots of the same build, but consistency is not guaranteed between different builds. - Element
Runner - The type corresponding to the ElementRunner protocol. The runner or operator of an element. This should be implemented by all element owners. The client end is passed to Power Broker via ElementSchema.element_runner. Power Broker calls SetLevel initially, and then whenever the required level of the element changes.
- Element
Runner SetLevel Request - Element
Runner SetLevel Response - Lease
Control - The type corresponding to the LeaseControl protocol. Provides lease-scoped access to actions that can be taken on a lease previously acquired via Lessor.Lease. Closing this control channel drops the lease. TODO(https://fxbug.dev/339474151): Switch from a protocol to an eventpair.
- Lease
Control Watch Status Request - Lease
Control Watch Status Response - Lessor
- The type corresponding to the Lessor protocol. Provides element-scoped access to request leases to raise the levels of an element previously added via Topology.AddElement.
- Permissions
- Element Permissions
- Power
Level Name - Mapping of a plaintext name to a PowerLevel. Names are expected to be unique between elements and persistent across reboots of the same build, but consistency is not guaranteed between different builds.
- Status
- The type corresponding to the Status protocol. Provides read-only access to the current PowerLevel of an element and the ability to watch changes to an element’s power level. A new channel to this protocol can be obtained by calling OpenStatus on the element’s ElementControl channel (and passed to other clients who need access to the element’s current power level).
- Topology
- The type corresponding to the Topology protocol. This is the primary initial protocol used by Power Element Owners to communicate with Power Broker. Power Element Owners should add the elements they own to the Power Topology through AddElement. All further interactions with Power Broker are done through channels opened by the AddElement call, which are scoped to the added element.
- Topology
AddElement Response
Enums§
- AddElement
Error - Binary
Power Level - BinaryPowerLevel is a well-known set of PowerLevels with only two states: OFF and ON.
- Dependency
Type - An assertive dependency is strongly-fulfilled and orderly-on-termination. An opportunistic dependency is weakly-fulfilled but still orderly-on-termination.
- Element
Info Provider Error - Lease
Error - Lease
Status - Modify
Dependency Error - Register
Dependency Token Error - Status
Error - Unregister
Dependency Token Error
Constants§
- MAX_
DEPENDENCIES_ IN_ ADD_ ELEMENT - MAX_
ELEMENT_ NAME_ LEN - MAX_
LEVEL_ NAME_ LEN - PowerLevel name lengths are limited to reduce Inspect space usage
- MAX_
TOKENS_ IN_ ADD_ ELEMENT - MAX_
VALID_ POWER_ LEVELS
Traits§
- Element
Control Client Handler - A client handler for the ElementControl protocol.
- Element
Control Server Handler - A server handler for the ElementControl protocol.
- Element
Info Provider Client Handler - A client handler for the ElementInfoProvider protocol.
- Element
Info Provider Server Handler - A server handler for the ElementInfoProvider protocol.
- Element
Info Provider Service Handler - A service handler for the
ElementInfoProviderServiceservice. - Element
Runner Client Handler - A client handler for the ElementRunner protocol.
- Element
Runner Server Handler - A server handler for the ElementRunner protocol.
- Lease
Control Client Handler - A client handler for the LeaseControl protocol.
- Lease
Control Server Handler - A server handler for the LeaseControl protocol.
- Lessor
Client Handler - A client handler for the Lessor protocol.
- Lessor
Server Handler - A server handler for the Lessor protocol.
- Status
Client Handler - A client handler for the Status protocol.
- Status
Server Handler - A server handler for the Status protocol.
- Topology
Client Handler - A client handler for the Topology protocol.
- Topology
Server Handler - A server handler for the Topology protocol.
Type Aliases§
- Power
Level - Used to describe the power level of an element. Could extend this further to support additional types of power levels, such as ACPI.