Trait arraybox::Buf

source ·
pub unsafe trait Buf: ConstDefault {
    // Required methods
    fn as_ptr(&self) -> *const u8;
    fn as_mut_ptr(&mut self) -> *mut u8;
    fn align() -> usize;
    fn len() -> usize;
}
Expand description

Stack-allocated space.

Safety

This trait can be implemented only through unconditional delegating to another implementation.

Required Methods§

source

fn as_ptr(&self) -> *const u8

Allocated space location as an immutable pointer.

source

fn as_mut_ptr(&mut self) -> *mut u8

Allocated space location as a mutable pointer.

source

fn align() -> usize

Allocated space alignment.

source

fn len() -> usize

Allocated space size.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> Buf for BufFor<T>