Struct web_sys::HtmlCanvasElement
source · #[repr(transparent)]pub struct HtmlCanvasElement { /* private fields */ }
Expand description
The HTMLCanvasElement
object
This API requires the following crate features to be activated: HtmlCanvasElement
Implementations§
source§impl HtmlCanvasElement
impl HtmlCanvasElement
source§impl HtmlCanvasElement
impl HtmlCanvasElement
source§impl HtmlCanvasElement
impl HtmlCanvasElement
source§impl HtmlCanvasElement
impl HtmlCanvasElement
source§impl HtmlCanvasElement
impl HtmlCanvasElement
sourcepub fn to_data_url(&self) -> Result<String, JsValue>
pub fn to_data_url(&self) -> Result<String, JsValue>
The toDataURL()
method
This API requires the following crate features to be activated: HtmlCanvasElement
source§impl HtmlCanvasElement
impl HtmlCanvasElement
source§impl HtmlCanvasElement
impl HtmlCanvasElement
source§impl HtmlCanvasElement
impl HtmlCanvasElement
sourcepub fn transfer_control_to_offscreen(&self) -> Result<OffscreenCanvas, JsValue>
pub fn transfer_control_to_offscreen(&self) -> Result<OffscreenCanvas, JsValue>
The transferControlToOffscreen()
method
This API requires the following crate features to be activated: HtmlCanvasElement
, OffscreenCanvas
source§impl HtmlCanvasElement
impl HtmlCanvasElement
source§impl HtmlCanvasElement
impl HtmlCanvasElement
source§impl HtmlCanvasElement
impl HtmlCanvasElement
source§impl HtmlCanvasElement
impl HtmlCanvasElement
sourcepub fn set_height(&self, height: u32)
pub fn set_height(&self, height: u32)
The height
setter
This API requires the following crate features to be activated: HtmlCanvasElement
Trait Implementations§
source§impl AsRef<Element> for HtmlCanvasElement
impl AsRef<Element> for HtmlCanvasElement
source§impl AsRef<EventTarget> for HtmlCanvasElement
impl AsRef<EventTarget> for HtmlCanvasElement
source§fn as_ref(&self) -> &EventTarget
fn as_ref(&self) -> &EventTarget
Converts this type into a shared reference of the (usually inferred) input type.
source§impl AsRef<HtmlElement> for HtmlCanvasElement
impl AsRef<HtmlElement> for HtmlCanvasElement
source§fn as_ref(&self) -> &HtmlElement
fn as_ref(&self) -> &HtmlElement
Converts this type into a shared reference of the (usually inferred) input type.
source§impl AsRef<JsValue> for HtmlCanvasElement
impl AsRef<JsValue> for HtmlCanvasElement
source§impl AsRef<Node> for HtmlCanvasElement
impl AsRef<Node> for HtmlCanvasElement
source§impl AsRef<Object> for HtmlCanvasElement
impl AsRef<Object> for HtmlCanvasElement
source§impl Clone for HtmlCanvasElement
impl Clone for HtmlCanvasElement
source§fn clone(&self) -> HtmlCanvasElement
fn clone(&self) -> HtmlCanvasElement
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for HtmlCanvasElement
impl Debug for HtmlCanvasElement
source§impl From<HtmlCanvasElement> for Element
impl From<HtmlCanvasElement> for Element
source§fn from(obj: HtmlCanvasElement) -> Element
fn from(obj: HtmlCanvasElement) -> Element
Converts to this type from the input type.
source§impl From<HtmlCanvasElement> for EventTarget
impl From<HtmlCanvasElement> for EventTarget
source§fn from(obj: HtmlCanvasElement) -> EventTarget
fn from(obj: HtmlCanvasElement) -> EventTarget
Converts to this type from the input type.
source§impl From<HtmlCanvasElement> for HtmlElement
impl From<HtmlCanvasElement> for HtmlElement
source§fn from(obj: HtmlCanvasElement) -> HtmlElement
fn from(obj: HtmlCanvasElement) -> HtmlElement
Converts to this type from the input type.
source§impl From<HtmlCanvasElement> for JsValue
impl From<HtmlCanvasElement> for JsValue
source§fn from(obj: HtmlCanvasElement) -> JsValue
fn from(obj: HtmlCanvasElement) -> JsValue
Converts to this type from the input type.
source§impl From<HtmlCanvasElement> for Node
impl From<HtmlCanvasElement> for Node
source§fn from(obj: HtmlCanvasElement) -> Node
fn from(obj: HtmlCanvasElement) -> Node
Converts to this type from the input type.
source§impl From<HtmlCanvasElement> for Object
impl From<HtmlCanvasElement> for Object
source§fn from(obj: HtmlCanvasElement) -> Object
fn from(obj: HtmlCanvasElement) -> Object
Converts to this type from the input type.
source§impl From<JsValue> for HtmlCanvasElement
impl From<JsValue> for HtmlCanvasElement
source§fn from(obj: JsValue) -> HtmlCanvasElement
fn from(obj: JsValue) -> HtmlCanvasElement
Converts to this type from the input type.
source§impl FromWasmAbi for HtmlCanvasElement
impl FromWasmAbi for HtmlCanvasElement
source§impl<'a> IntoWasmAbi for &'a HtmlCanvasElement
impl<'a> IntoWasmAbi for &'a HtmlCanvasElement
source§impl IntoWasmAbi for HtmlCanvasElement
impl IntoWasmAbi for HtmlCanvasElement
source§impl JsCast for HtmlCanvasElement
impl JsCast for HtmlCanvasElement
source§fn instanceof(val: &JsValue) -> bool
fn instanceof(val: &JsValue) -> bool
Performs a dynamic
instanceof
check to see whether the JsValue
provided is an instance of this type. Read moresource§fn unchecked_from_js(val: JsValue) -> Self
fn unchecked_from_js(val: JsValue) -> Self
source§fn unchecked_from_js_ref(val: &JsValue) -> &Self
fn unchecked_from_js_ref(val: &JsValue) -> &Self
source§fn is_instance_of<T>(&self) -> boolwhere
T: JsCast,
fn is_instance_of<T>(&self) -> boolwhere
T: JsCast,
Test whether this JS value is an instance of the type
T
. Read moresource§fn dyn_into<T>(self) -> Result<T, Self>where
T: JsCast,
fn dyn_into<T>(self) -> Result<T, Self>where
T: JsCast,
Performs a dynamic cast (checked at runtime) of this value into the
target type
T
. Read moresource§fn dyn_ref<T>(&self) -> Option<&T>where
T: JsCast,
fn dyn_ref<T>(&self) -> Option<&T>where
T: JsCast,
Performs a dynamic cast (checked at runtime) of this value into the
target type
T
. Read moresource§fn unchecked_into<T>(self) -> Twhere
T: JsCast,
fn unchecked_into<T>(self) -> Twhere
T: JsCast,
Performs a zero-cost unchecked cast into the specified type. Read more
source§impl<'a> OptionIntoWasmAbi for &'a HtmlCanvasElement
impl<'a> OptionIntoWasmAbi for &'a HtmlCanvasElement
source§impl RefFromWasmAbi for HtmlCanvasElement
impl RefFromWasmAbi for HtmlCanvasElement
§type Abi = <JsValue as RefFromWasmAbi>::Abi
type Abi = <JsValue as RefFromWasmAbi>::Abi
The wasm ABI type references to
Self
are recovered from.§type Anchor = ManuallyDrop<HtmlCanvasElement>
type Anchor = ManuallyDrop<HtmlCanvasElement>
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. Read moreAuto Trait Implementations§
impl RefUnwindSafe for HtmlCanvasElement
impl Send for HtmlCanvasElement
impl Sync for HtmlCanvasElement
impl Unpin for HtmlCanvasElement
impl UnwindSafe for HtmlCanvasElement
Blanket Implementations§
source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::Abi
source§fn return_abi(self, extra: &mut dyn Stack) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self, extra: &mut dyn Stack) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi
, except that it may throw and never
return in the case of Err
. Read more