[][src]Struct rustler::types::Binary

pub struct Binary<'a> { /* fields omitted */ }

Methods

impl<'a> Binary<'a>[src]

pub fn from_owned(bin: OwnedBinary, env: Env<'a>) -> Self[src]

Releases a given OwnedBinary to the VM. After this point the binary will be immutable.

pub fn to_owned(&self) -> Option<OwnedBinary>[src]

pub fn from_term(term: Term<'a>) -> Result<Self, Error>[src]

pub fn to_term<'b>(&self, env: Env<'b>) -> Term<'b>[src]

pub fn as_slice(&self) -> &'a [u8][src]

pub fn make_subbinary(
    &self,
    offset: usize,
    length: usize
) -> NifResult<Binary<'a>>
[src]

Returns a new view into the same binary. This will not copy anything.

Trait Implementations

impl<'a> Encoder for Binary<'a>[src]

impl<'a> Decoder<'a> for Binary<'a>[src]

impl<'a> Copy for Binary<'a>[src]

impl<'a> Clone for Binary<'a>[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<'a> Deref for Binary<'a>[src]

type Target = [u8]

The resulting type after dereferencing.

impl<'a> Borrow<[u8]> for Binary<'a>[src]

Auto Trait Implementations

impl<'a> !Send for Binary<'a>

impl<'a> !Sync for Binary<'a>

Blanket Implementations

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

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

type Owned = T

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

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

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

The type returned in the event of a conversion error.