Struct sauron::prelude::wasm_bindgen::Clamped [−][src]
pub struct Clamped<T>(pub T);
Expand description
A wrapper type around slices and vectors for binding the Uint8ClampedArray
array in JS.
If you need to invoke a JS API which must take Uint8ClampedArray
array,
then you can define it as taking one of these types:
Clamped<&[u8]>
Clamped<&mut [u8]>
Clamped<Vec<u8>>
All of these types will show up as Uint8ClampedArray
in JS and will have
different forms of ownership in Rust.
Tuple Fields
0: T
Trait Implementations
type Abi = <T as FromWasmAbi>::Abi
type Abi = <T as FromWasmAbi>::Abi
The wasm ABI type that this converts from when coming back out from the ABI boundary. Read more
type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
The wasm ABI type that this converts into when crossing the ABI boundary. Read more
Auto Trait Implementations
impl<T> RefUnwindSafe for Clamped<T> where
T: RefUnwindSafe,
impl<T> UnwindSafe for Clamped<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as IntoWasmAbi::Abi
Same as IntoWasmAbi::into_abi
, except that it may throw and never
return in the case of Err
. Read more