[−][src]Trait sodoken::AsBuffer
A buffer represents an array of bytes that may or may not be memory locked.
Required methods
pub fn deep_clone(&self) -> SodokenResult<Buffer>
[src]
Deep clone the actual bytes of this buffer. The type (memlocked or not) will be retained. Not to be confused with "clone" on the Buffer struct, which just bumps a refcount.
pub fn read_lock(&self) -> ReadGuard<'_>
[src]
Obtain read access to the underlying buffer.
pub fn write_lock(&self) -> WriteGuard<'_>
[src]
Obtain write access to the underlying buffer.
Provided methods
pub fn to_boxed_slice(&self) -> Box<[u8]>
[src]
Provided method to extract this instance into a boxed slice. Be sure you are not exposing something that should be kept protected.