Struct solana_rbpf::aligned_memory::AlignedMemory[][src]

pub struct AlignedMemory { /* fields omitted */ }

Provides u8 slices at a specified alignment

Implementations

impl AlignedMemory[src]

pub fn new(len: usize, align: usize) -> Self[src]

Return a new AlignedMem type

pub fn len(&self) -> usize[src]

Get the length of the data

pub fn is_empty(&self) -> bool[src]

Is the memory empty

pub fn write_index(&self) -> usize[src]

Get the current write index

pub fn as_slice(&self) -> &[u8][src]

Get an aligned slice

pub fn as_slice_mut(&mut self) -> &mut [u8][src]

Get an aligned mutable slice

pub fn fill(&mut self, num: usize, value: u8) -> Result<()>[src]

Fill memory with value starting at the write_index

Trait Implementations

impl Clone for AlignedMemory[src]

impl Debug for AlignedMemory[src]

impl PartialEq<AlignedMemory> for AlignedMemory[src]

impl StructuralPartialEq for AlignedMemory[src]

impl Write for AlignedMemory[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<Ctx, W> IOwrite<Ctx> for W where
    W: Write + ?Sized,
    Ctx: Copy
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<W> WriteBytesExt for W where
    W: Write + ?Sized
[src]