Struct rustler::types::binary::OwnedBinary[][src]

pub struct OwnedBinary(_);
Expand description

An mutable smart-pointer to an Erlang binary.

See module-level doc for more information.

Implementations

Allocates a new OwnedBinary with size size.

Memory is not initialized. If uninitialized memory is undesirable, set it manually.

Errors

If allocation fails, None is returned.

Copies src’s data into a new OwnedBinary.

Errors

If allocation fails, None is returned.

Attempts to reallocate self with the new size.

Memory outside the range of the original binary will not be initialized. If uninitialized memory is undesirable, set it manually.

Errors

If reallocation fails, false is returned. Data remains intact on error.

Attempts to reallocate self with the new size.

If reallocation fails, it will perform a copy instead.

Memory outside the range of the original binary will not be initialized. If uninitialized memory is undesirable, set it manually.

Extracts a slice containing the entire binary.

Extracts a mutable slice of the entire binary.

Consumes self and returns an immutable Binary.

This method is the mirror of Binary::from_owned, and they can be used interchangeably.

Trait Implementations

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

The resulting type after dereferencing.

Dereferences the value.

Mutably dereferences the value.

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.