Skip to main content

Crate fdf_component

Crate fdf_component 

Source
Expand description

Wrappers around the mechanisms of driver registration for the driver framework for implementing startup and shutdown of the driver in rust.

Modules§

inspect_publisher
macros
Implementation of the [driver_register] macro for registering driver implementations with the driver host.
testing
Provides a driver unit testing library.

Macros§

driver_register
Macro for declaring a driver’s implementation of the Driver trait.

Structs§

DriverContext
The context arguments passed to the driver in its start arguments.
HealthAlertReporter
Lets a driver proactively report faults to the driver framework as OnHealthAlert events.
HealthCheckInspect
Mirrors a driver’s most recent health check result into its own Inspect hierarchy.
HealthCheckResponse
The fuchsia.driver.framework health check types used by Driver::health_check and HealthAlertReporter, re-exported so drivers do not need a direct dependency on the fidl_next bindings to use them. Response returned by a driver health check.
HealthCondition
The fuchsia.driver.framework health check types used by Driver::health_check and HealthAlertReporter, re-exported so drivers do not need a direct dependency on the fidl_next bindings to use them. One condition detected by a driver health check.
HealthDiagnosticItem
The fuchsia.driver.framework health check types used by Driver::health_check and HealthAlertReporter, re-exported so drivers do not need a direct dependency on the fidl_next bindings to use them. Key-value diagnostic property captured during a driver health check.
Incoming
Implements access to the incoming namespace for a driver. It provides methods for accessing incoming protocols and services by either their marker or proxy types, and can be used as a [Directory] with the functions in [fuchsia_component::client].
Node
Holds on to a NodeProxy and provides simplified methods for adding child nodes.
NodeBuilder
A builder for adding a child node to an existing Node.
ParentProperty
A property of one of the driver’s parent nodes, as reported by crate::DriverContext::node_properties.
PropertyValue
A newtype wrapper that can be used to construct [NodePropertyValue]-compatible values for crate::NodeBuilder::add_property, and to read the values of the properties reported by crate::DriverContext::node_properties.
ServiceConnector
A builder for connecting to an aggregated service instance in the driver’s incoming namespace. By default, it will connect to the default instance, named default. You can override this by calling Self::instance.
ServiceMemberConnector
Used with [ServiceHandlerAdapter] as a connector to members of a service instance.
ServiceOffer
A builder for creating [Offer]-compatible values for crate::NodeBuilder::add_offer that serves a fidl service.

Enums§

DriverError
Error type returned by drivers on startup.
HealthAlert
The fuchsia.driver.framework health check types used by Driver::health_check and HealthAlertReporter, re-exported so drivers do not need a direct dependency on the fidl_next bindings to use them. Payload of a proactive health alert emitted by a driver via OnHealthAlert. “Upstream” is what the driver depends on (parents: buses, clocks, power domains, composite parents). “Downstream” is what depends on the driver (children / consumers).
HealthCheckError
The fuchsia.driver.framework health check types used by Driver::health_check and HealthAlertReporter, re-exported so drivers do not need a direct dependency on the fidl_next bindings to use them. Error codes returned when a health check cannot be completed.
HealthCheckRequest
The fuchsia.driver.framework health check types used by Driver::health_check and HealthAlertReporter, re-exported so drivers do not need a direct dependency on the fidl_next bindings to use them. Specifies the depth and latency budget of a driver health check.
HealthDiagnosticValue
The fuchsia.driver.framework health check types used by Driver::health_check and HealthAlertReporter, re-exported so drivers do not need a direct dependency on the fidl_next bindings to use them. Diagnostic value returned in a HealthCheckResponse.
HealthStatus
The fuchsia.driver.framework health check types used by Driver::health_check and HealthAlertReporter, re-exported so drivers do not need a direct dependency on the fidl_next bindings to use them. Operational health status reported for a driver or condition.

Constants§

HEALTH_INSPECT_NODE_NAME
Name of the Inspect node that holds the most recent health check result or self-reported fault. Matches the C++ driver SDK (root/driver_health_check).

Traits§

Driver
Entry points into a driver for starting and stopping.

Functions§

record_health_check_to_inspect
Records the result of a health check under a new HEALTH_INSPECT_NODE_NAME child of parent and returns it. Dropping the returned node removes the record again.

Type Aliases§

HealthCheckResult
The result of a single health check.
ServiceInstance
A type alias representing a service instance with members that can be connected to using the fidl_next bindings.