Trait openraft::ToStorageResult

source ·
pub trait ToStorageResult<NID, T>
where NID: NodeId,
{ // Required method fn sto_res<F>(self, f: F) -> Result<T, StorageError<NID>> where F: FnOnce() -> (ErrorSubject<NID>, ErrorVerb); }
Expand description

Convert error to StorageError::IO();

Required Methods§

source

fn sto_res<F>(self, f: F) -> Result<T, StorageError<NID>>
where F: FnOnce() -> (ErrorSubject<NID>, ErrorVerb),

Convert Result<T, E> to Result<T, StorageError::IO(StorageIOError)>

f provides error context for building the StorageIOError.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<NID, T> ToStorageResult<NID, T> for Result<T, Error>
where NID: NodeId,

source§

fn sto_res<F>(self, f: F) -> Result<T, StorageError<NID>>
where F: FnOnce() -> (ErrorSubject<NID>, ErrorVerb),

Implementors§