pub struct MediaButtonsHandler {
pub inspect_status: InputHandlerStatus,
/* private fields */
}
Expand description
A MediaButtonsHandler
tracks MediaButtonListeners and sends media button events to them.
Fields§
§inspect_status: InputHandlerStatus
The inventory of this handler’s Inspect status.
Implementations§
Source§impl MediaButtonsHandler
impl MediaButtonsHandler
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 MediaButtonsHandler
that sends media button events to listeners.
Sourcepub async fn handle_device_listener_registry_request_stream(
self: &Rc<Self>,
stream: DeviceListenerRegistryRequestStream,
) -> Result<(), Error>
pub async fn handle_device_listener_registry_request_stream( self: &Rc<Self>, stream: DeviceListenerRegistryRequestStream, ) -> Result<(), Error>
Handles the incoming DeviceListenerRegistryRequestStream.
This method will end when the request stream is closed. If the stream closes with an error the error will be returned in the Result.
§Parameters
stream
: The stream of DeviceListenerRegistryRequestStream.
Trait Implementations§
Source§impl UnhandledInputHandler for MediaButtonsHandler
impl UnhandledInputHandler for MediaButtonsHandler
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,
Returns a vector of InputEvents to propagate to the next InputHandler. Read more
fn set_handler_healthy(self: Rc<Self>)
fn set_handler_unhealthy(self: Rc<Self>, msg: &str)
Auto Trait Implementations§
impl !Freeze for MediaButtonsHandler
impl !RefUnwindSafe for MediaButtonsHandler
impl Send for MediaButtonsHandler
impl !Sync for MediaButtonsHandler
impl Unpin for MediaButtonsHandler
impl !UnwindSafe for MediaButtonsHandler
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§impl<T> InputHandler for Twhere
T: UnhandledInputHandler,
impl<T> InputHandler for Twhere
T: UnhandledInputHandler,
Source§fn handle_input_event<'async_trait>(
self: Rc<T>,
input_event: InputEvent,
) -> Pin<Box<dyn Future<Output = Vec<InputEvent>> + 'async_trait>>where
T: 'async_trait,
fn handle_input_event<'async_trait>(
self: Rc<T>,
input_event: InputEvent,
) -> Pin<Box<dyn Future<Output = Vec<InputEvent>> + 'async_trait>>where
T: 'async_trait,
Returns a vector of InputEvents to propagate to the next InputHandler. Read more