Struct Clamped
pub struct Clamped<T>(pub T);
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.
Fields
0: T
Trait Implementations
impl<T> Deref for Clamped<T>
type Target = T;fn deref(&self) -> &T
impl<T> DerefMut for Clamped<T>
fn deref_mut(&mut self) -> &mut T
impl<T: Clone> Clone for Clamped<T>
fn clone(&self) -> Self
impl<T: Copy> Copy for Clamped<T>
impl<T: Debug> Debug for Clamped<T>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<T: Eq> Eq for Clamped<T>
impl<T: FromWasmAbi> FromWasmAbi for Clamped<T>
type Abi = <T as FromWasmAbi>::Abi;unsafe fn from_abi(js: T::Abi) -> Self
impl<T: IntoWasmAbi> IntoWasmAbi for Clamped<T>
type Abi = <T as IntoWasmAbi>::Abi;fn into_abi(self) -> Self::Abi
impl<T: PartialEq> PartialEq for Clamped<T>
fn eq(&self, other: &Self) -> bool