Skip to main content

Handle

Struct Handle 

Source
pub struct Handle { /* private fields */ }
Expand description

Stable browser control handle returned by start. See the compiled browser-shell example on crate::wasm::cyd_web.

Implementations§

Source§

impl Handle

Source

pub fn touch_down(&self, position_x: f32, position_y: f32)

Press the simulated touch panel at canvas coordinates. See the compiled browser-shell example on crate::wasm::cyd_web.

Source

pub fn touch_move(&self, position_x: f32, position_y: f32)

Move the simulated touch point. See the compiled browser-shell example on crate::wasm::cyd_web.

Source

pub fn touch_up(&self)

Release the simulated touch panel. See the compiled browser-shell example on crate::wasm::cyd_web.

Source

pub fn boot_down(&self)

Press the simulated BOOT button. See the compiled browser-shell example on crate::wasm::cyd_web.

Source

pub fn boot_up(&self)

Release the simulated BOOT button. See the compiled browser-shell example on crate::wasm::cyd_web.

Source

pub fn orientation_is_inverted(&self) -> bool

Return whether the current orientation is inverted. See the compiled browser-shell example on crate::wasm::cyd_web.

Source

pub fn take_notice(&self) -> Option<Notice>

Remove and return the oldest pending framework notice. See the compiled browser-shell example on crate::wasm::cyd_web.

Source

pub fn request_restart(&self)

Request an application restart. See the compiled browser-shell example on crate::wasm::cyd_web.

Source

pub fn clear_storage_and_restart(&self)

Clear framework storage and restart the application. See the compiled browser-shell example on crate::wasm::cyd_web.

Source

pub fn clock_control_is_visible(&self) -> bool

Return whether the application has requested the clock control. See the compiled browser-shell example on crate::wasm::cyd_web.

Source

pub fn set_clock_time_of_day(&self, seconds_of_day: u32) -> Result<(), JsValue>

Set the simulated local time, in seconds after midnight. See the compiled browser-shell example on crate::wasm::cyd_web.

Source

pub fn use_live_clock(&self)

Restore the browser’s live local clock. See the compiled browser-shell example on crate::wasm::cyd_web.

Source

pub fn page_title(&self) -> String

Return the configured page title. See the compiled browser-shell example on crate::wasm::cyd_web.

Source

pub fn page_preview(&self) -> String

Return the configured preview text. See the compiled browser-shell example on crate::wasm::cyd_web.

Source

pub fn page_description(&self) -> String

Return the configured page description. See the compiled browser-shell example on crate::wasm::cyd_web.

Source

pub fn page_controls(&self) -> String

Return the configured interaction instructions. See the compiled browser-shell example on crate::wasm::cyd_web.

Source

pub fn page_core_code_url(&self) -> String

Return the configured platform-neutral source URL. See the compiled browser-shell example on crate::wasm::cyd_web.

Trait Implementations§

Source§

impl From<Handle> for JsValue

Source§

fn from(value: Handle) -> Self

Converts to this type from the input type.
Source§

impl FromWasmAbi for Handle

Source§

type Abi = u32

The Wasm ABI type that this converts from when coming back out from the ABI boundary.
Source§

unsafe fn from_abi(js: u32) -> Self

Recover a Self from Self::Abi. Read more
Source§

impl IntoWasmAbi for Handle

Source§

type Abi = u32

The Wasm ABI type that this converts into when crossing the ABI boundary.
Source§

fn into_abi(self) -> u32

Convert self into Self::Abi so that it can be sent across the wasm ABI boundary.
Source§

impl LongRefFromWasmAbi for Handle

Source§

type Abi = u32

Same as RefFromWasmAbi::Abi
Source§

type Anchor = RcRef<Handle>

Same as RefFromWasmAbi::Anchor
Source§

unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor

Same as RefFromWasmAbi::ref_from_abi
Source§

impl OptionFromWasmAbi for Handle

Source§

fn is_none(abi: &Self::Abi) -> bool

Tests whether the argument is a “none” instance. If so it will be deserialized as None, and otherwise it will be passed to FromWasmAbi.
Source§

impl OptionIntoWasmAbi for Handle

Source§

fn none() -> Self::Abi

Returns an ABI instance indicating “none”, which JS will interpret as the None branch of this option. Read more
Source§

impl RefFromWasmAbi for Handle

Source§

type Abi = u32

The Wasm ABI type references to Self are recovered from.
Source§

type Anchor = RcRef<Handle>

The type that holds the reference to Self for the duration of the invocation of the function that has an &Self parameter. This is required to ensure that the lifetimes don’t persist beyond one function call, and so that they remain anonymous.
Source§

unsafe fn ref_from_abi(js: Self::Abi) -> Self::Anchor

Recover a Self::Anchor from Self::Abi. Read more
Source§

impl RefMutFromWasmAbi for Handle

Source§

type Abi = u32

Same as RefFromWasmAbi::Abi
Source§

type Anchor = RcRefMut<Handle>

Same as RefFromWasmAbi::Anchor
Source§

unsafe fn ref_mut_from_abi(js: Self::Abi) -> Self::Anchor

Same as RefFromWasmAbi::ref_from_abi
Source§

impl SupportsConstructor for Handle

Source§

impl SupportsInstanceProperty for Handle

Source§

impl SupportsStaticProperty for Handle

Source§

impl TryFromJsValue for Handle

Source§

fn try_from_js_value(value: JsValue) -> Result<Self, JsValue>

Performs the conversion.
Source§

fn try_from_js_value_ref(value: &JsValue) -> Option<Self>

Performs the conversion.
Source§

impl VectorFromWasmAbi for Handle

Source§

type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi

Source§

unsafe fn vector_from_abi(js: Self::Abi) -> Box<[Handle]>

Source§

impl VectorIntoWasmAbi for Handle

Source§

type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi

Source§

fn vector_into_abi(vector: Box<[Handle]>) -> Self::Abi

Source§

impl WasmDescribe for Handle

Source§

impl WasmDescribeVector for Handle

Auto Trait Implementations§

§

impl !RefUnwindSafe for Handle

§

impl !Send for Handle

§

impl !Sync for Handle

§

impl !UnwindSafe for Handle

§

impl Freeze for Handle

§

impl Unpin for Handle

§

impl UnsafeUnpin for Handle

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Az for T

Source§

fn az<Dst>(self) -> Dst
where T: Cast<Dst>,

Casts the value.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<Src, Dst> CastFrom<Src> for Dst
where Src: Cast<Dst>,

Source§

fn cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> CheckedAs for T

Source§

fn checked_as<Dst>(self) -> Option<Dst>
where T: CheckedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> CheckedCastFrom<Src> for Dst
where Src: CheckedCast<Dst>,

Source§

fn checked_cast_from(src: Src) -> Option<Dst>

Casts the value.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> OverflowingAs for T

Source§

fn overflowing_as<Dst>(self) -> (Dst, bool)
where T: OverflowingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> OverflowingCastFrom<Src> for Dst
where Src: OverflowingCast<Dst>,

Source§

fn overflowing_cast_from(src: Src) -> (Dst, bool)

Casts the value.
Source§

impl<T> ReturnWasmAbi for T
where T: IntoWasmAbi,

Source§

type Abi = <T as IntoWasmAbi>::Abi

Same as IntoWasmAbi::Abi
Source§

fn return_abi(self) -> <T as ReturnWasmAbi>::Abi

Same as IntoWasmAbi::into_abi, except that it may throw and never return in the case of Err.
Source§

impl<T> SaturatingAs for T

Source§

fn saturating_as<Dst>(self) -> Dst
where T: SaturatingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> SaturatingCastFrom<Src> for Dst
where Src: SaturatingCast<Dst>,

Source§

fn saturating_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> StrictAs for T

Source§

fn strict_as<Dst>(self) -> Dst
where T: StrictCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> StrictCastFrom<Src> for Dst
where Src: StrictCast<Dst>,

Source§

fn strict_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> UnwrappedAs for T

Source§

fn unwrapped_as<Dst>(self) -> Dst
where T: UnwrappedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> UnwrappedCastFrom<Src> for Dst
where Src: UnwrappedCast<Dst>,

Source§

fn unwrapped_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<S, T> Upcast<T> for S
where T: UpcastFrom<S> + ?Sized, S: ?Sized,

Source§

fn upcast(&self) -> &T
where Self: ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider ref type within the Wasm bindgen generics type system. Read more
Source§

fn upcast_into(self) -> T
where Self: Sized + ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider type within the Wasm bindgen generics type system. Read more
Source§

impl<T> WrappingAs for T

Source§

fn wrapping_as<Dst>(self) -> Dst
where T: WrappingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> WrappingCastFrom<Src> for Dst
where Src: WrappingCast<Dst>,

Source§

fn wrapping_cast_from(src: Src) -> Dst

Casts the value.