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§
sourcefn sto_res<F>(self, f: F) -> Result<T, StorageError<NID>>where
F: FnOnce() -> (ErrorSubject<NID>, ErrorVerb),
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.