pub struct FactoryResetHandler {
pub inspect_status: InputHandlerStatus,
/* private fields */
}
Expand description
A FactoryResetHandler
tracks the state of the consumer control buttons
and starts the factory reset process after appropriate timeouts.
Fields§
§inspect_status: InputHandlerStatus
The inventory of this handler’s Inspect status.
Implementations§
Source§impl FactoryResetHandler
impl FactoryResetHandler
Sourcepub fn new(
input_handlers_node: &Node,
metrics_logger: MetricsLogger,
) -> Rc<Self>
pub fn new( input_handlers_node: &Node, metrics_logger: MetricsLogger, ) -> Rc<Self>
Creates a new FactoryResetHandler
that listens for the reset button
and handles timing down and, ultimately, factory resetting the device.
Sourcepub fn handle_factory_reset_countdown_request_stream(
self: Rc<Self>,
stream: FactoryResetCountdownRequestStream,
) -> impl Future<Output = Result<(), Error>>
pub fn handle_factory_reset_countdown_request_stream( self: Rc<Self>, stream: FactoryResetCountdownRequestStream, ) -> impl Future<Output = Result<(), Error>>
Handles the request stream for FactoryResetCountdown
§Parameters
stream
: The FactoryResetCountdownRequestStream
to be handled.
Sourcepub fn handle_recovery_policy_device_request_stream(
self: Rc<Self>,
stream: DeviceRequestStream,
) -> impl Future<Output = Result<(), Error>>
pub fn handle_recovery_policy_device_request_stream( self: Rc<Self>, stream: DeviceRequestStream, ) -> impl Future<Output = Result<(), Error>>
Handles the request stream for fuchsia.recovery.policy.Device
§Parameters
stream
: The DeviceRequestStream
to be handled.
Trait Implementations§
Source§impl UnhandledInputHandler for FactoryResetHandler
impl UnhandledInputHandler for FactoryResetHandler
Source§fn handle_unhandled_input_event<'async_trait>(
self: Rc<Self>,
unhandled_input_event: UnhandledInputEvent,
) -> Pin<Box<dyn Future<Output = Vec<InputEvent>> + 'async_trait>>where
Self: 'async_trait,
fn handle_unhandled_input_event<'async_trait>(
self: Rc<Self>,
unhandled_input_event: UnhandledInputEvent,
) -> Pin<Box<dyn Future<Output = Vec<InputEvent>> + 'async_trait>>where
Self: 'async_trait,
This InputHandler doesn’t consume any input events. It just passes them on to the next handler in the pipeline. Since it doesn’t need exclusive access to the events this seems like the best way to avoid handlers further down the pipeline missing events that they need.