Struct 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
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