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:

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

impl<T: PartialEq> StructuralPartialEq for Clamped<T>

Auto Trait Implementations

impl<T> Freeze for Clamped<T> where T: Freeze,

impl<T> RefUnwindSafe for Clamped<T> where T: RefUnwindSafe,

impl<T> Send for Clamped<T> where T: Send,

impl<T> Sync for Clamped<T> where T: Sync,

impl<T> Unpin for Clamped<T> where T: Unpin,

impl<T> UnsafeUnpin for Clamped<T> where T: UnsafeUnpin,

impl<T> UnwindSafe for Clamped<T> where T: UnwindSafe,

Blanket Implementations

impl<P, T> Receiver for Clamped<T> where P: Deref<Target = T> + ?Sized, T: ?Sized,

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

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

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

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

impl<T> CloneToUninit for Clamped<T> where T: Clone,

impl<T> From<T> for Clamped<T>

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

impl<T> ToOwned for Clamped<T> where T: Clone,

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

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

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