[][src]Struct ic_cdk::api::stable::StableWriter

pub struct StableWriter { /* fields omitted */ }

A writer to the stable memory. Will attempt to grow the memory as it writes, and keep offsets and total capacity.

Implementations

impl StableWriter[src]

pub fn grow(&mut self, added_pages: u32) -> Result<(), StableMemoryError>[src]

Attempt to grow the memory by adding new pages.

pub fn write(&mut self, buf: &[u8]) -> Result<usize, StableMemoryError>[src]

Write a byte slice to the buffer. The only condition where this will error out is if it cannot grow the memory.

Trait Implementations

impl Default for StableWriter[src]

impl Write for StableWriter[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<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

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<W> WriteBytesExt for W where
    W: Write + ?Sized