pub struct InteractionStateHandler {
pub inspect_status: InputHandlerStatus,
/* private fields */
}Expand description
An InteractionStateHandler tracks the state of user input interaction.
Fields§
§inspect_status: InputHandlerStatusThe inventory of this handler’s Inspect status.
Implementations§
Source§impl InteractionStateHandler
impl InteractionStateHandler
Sourcepub async fn new(
idle_threshold_ms: MonotonicDuration,
input_handlers_node: &Node,
state_publisher: InteractionStatePublisher,
suspend_enabled: bool,
enable_button_baton_passing: bool,
enable_mouse_baton_passing: bool,
enable_touch_baton_passing: bool,
) -> Rc<Self>
pub async fn new( idle_threshold_ms: MonotonicDuration, input_handlers_node: &Node, state_publisher: InteractionStatePublisher, suspend_enabled: bool, enable_button_baton_passing: bool, enable_mouse_baton_passing: bool, enable_touch_baton_passing: bool, ) -> Rc<Self>
Creates a new InteractionStateHandler that listens for user input
input interactions and notifies clients of interaction state changes.
Trait Implementations§
Source§impl UnhandledInputHandler for InteractionStateHandler
impl UnhandledInputHandler for InteractionStateHandler
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.
fn set_handler_healthy(self: Rc<Self>)
fn set_handler_unhealthy(self: Rc<Self>, msg: &str)
fn get_name(&self) -> &'static str
Source§fn interest(&self) -> Vec<InputEventType>
fn interest(&self) -> Vec<InputEventType>
Returns the types of input events this handler is interested in.
Auto Trait Implementations§
impl !Freeze for InteractionStateHandler
impl !RefUnwindSafe for InteractionStateHandler
impl !Send for InteractionStateHandler
impl !Sync for InteractionStateHandler
impl Unpin for InteractionStateHandler
impl !UnwindSafe for InteractionStateHandler
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
fn set_handler_healthy(self: Rc<T>)
fn set_handler_unhealthy(self: Rc<T>, msg: &str)
Source§fn interest(&self) -> Vec<InputEventType>
fn interest(&self) -> Vec<InputEventType>
Returns the types of input events this handler is interested in.
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
Converts the given service transport handle of type
T to [Self]Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more