[][src]Struct ducc::Bytes

pub struct Bytes<'ducc>(_);

Reference to a JavaScript Uint8Array.

Methods

impl<'ducc> Bytes<'ducc>[src]

pub fn to_vec(&self) -> Vec<u8>[src]

Extracts the byte data from JavaScript into a Vec<u8>.

pub fn into_object(self) -> Object<'ducc>[src]

Consumes the buffer and returns it as a JavaScript object. This is inexpensive, since a buffer is an object.

Trait Implementations

impl<'ducc> ToValue<'ducc> for Bytes<'ducc>[src]

impl<'ducc> FromValue<'ducc> for Bytes<'ducc>[src]

impl<'ducc> Clone for Bytes<'ducc>[src]

impl<'ducc> Debug for Bytes<'ducc>[src]

Auto Trait Implementations

impl<'ducc> !Send for Bytes<'ducc>

impl<'ducc> Unpin for Bytes<'ducc>

impl<'ducc> !Sync for Bytes<'ducc>

impl<'ducc> UnwindSafe for Bytes<'ducc>

impl<'ducc> RefUnwindSafe for Bytes<'ducc>

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]