Skip to main content

Keyboard

Trait Keyboard 

Source
pub trait Keyboard {
    // Required methods
    fn down(
        &self,
        key: &str,
        context: &BrowsingContext,
    ) -> impl Future<Output = Result<(), InputError>>;
    fn up(
        &self,
        key: &str,
        context: &BrowsingContext,
    ) -> impl Future<Output = Result<(), InputError>>;
    fn press(
        &self,
        key: &str,
        context: &BrowsingContext,
        options: Option<KeyPressOptions>,
    ) -> impl Future<Output = Result<(), InputError>>;
    fn type_text(
        &self,
        text: &str,
        context: &BrowsingContext,
        options: Option<KeyboardTypeOptions>,
    ) -> impl Future<Output = Result<(), InputError>>;
}

Required Methods§

Source

fn down( &self, key: &str, context: &BrowsingContext, ) -> impl Future<Output = Result<(), InputError>>

Source

fn up( &self, key: &str, context: &BrowsingContext, ) -> impl Future<Output = Result<(), InputError>>

Source

fn press( &self, key: &str, context: &BrowsingContext, options: Option<KeyPressOptions>, ) -> impl Future<Output = Result<(), InputError>>

Source

fn type_text( &self, text: &str, context: &BrowsingContext, options: Option<KeyboardTypeOptions>, ) -> impl Future<Output = Result<(), InputError>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§