Enum nix::sys::aio::Buffer
[−]
[src]
pub enum Buffer<'a> {
None,
Bytes(Bytes),
BytesMut(BytesMut),
Phantom(PhantomData<&'a mut [u8]>),
}Owns (uniquely or shared) a memory buffer to keep it from Droping while
the kernel has a pointer to it.
Variants
NoneNo buffer to own.
Used for operations like aio_fsync that have no data, or for unsafe
operations that work with raw pointers.
Bytes(Bytes)Immutable shared ownership Bytes object
BytesMut(BytesMut)Mutable uniquely owned BytesMut object
Phantom(PhantomData<&'a mut [u8]>)Keeps a reference to a slice
Methods
impl<'a> Buffer<'a>[src]
pub fn bytes(&self) -> Option<&Bytes>[src]
Return the inner Bytes, if any
pub fn bytes_mut(&self) -> Option<&BytesMut>[src]
Return the inner BytesMut, if any
pub fn is_none(&self) -> bool[src]
Is this Buffer None?
Trait Implementations
impl<'a> Clone for Buffer<'a>[src]
fn clone(&self) -> Buffer<'a>[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more