Trait lwk::ForeignPersister

source ·
pub trait ForeignPersister: Send + Sync {
    // Required methods
    fn get(&self, index: u64) -> Result<Option<Arc<Update>>, LwkError>;
    fn push(&self, update: Arc<Update>) -> Result<(), LwkError>;
}
Expand description

An exported trait, useful for caller-defined persistence.

Required Methods§

source

fn get(&self, index: u64) -> Result<Option<Arc<Update>>, LwkError>

source

fn push(&self, update: Arc<Update>) -> Result<(), LwkError>

Trait Implementations§

source§

impl<T> FfiConverterArc<T> for dyn ForeignPersister

§

type FfiType = *const c_void

source§

fn lower(obj: Arc<Self>) -> Self::FfiType

source§

fn try_lift(v: Self::FfiType) -> Result<Arc<Self>>

source§

fn write(obj: Arc<Self>, buf: &mut Vec<u8>)

source§

fn try_read(buf: &mut &[u8]) -> Result<Arc<Self>>

source§

const TYPE_ID_META: MetadataBuffer = _

source§

impl<T> LiftRef<T> for dyn ForeignPersister

Implementors§