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.
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 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
Auto Trait Implementations
impl RefUnwindSafe for OwnedBinary
impl !Sync for OwnedBinary
impl Unpin for OwnedBinary
impl UnwindSafe for OwnedBinary