Enum jopemachine_raft::Error
source · pub enum Error {
Io(Error),
Store(StorageError),
StepLocalMsg,
StepPeerNotFound,
ProposalDropped,
ConfigInvalid(String),
CodecError(ProtobufError),
Exists {
id: u64,
set: &'static str,
},
NotExists {
id: u64,
set: &'static str,
},
ConfChangeError(String),
RequestSnapshotDropped,
}
Expand description
The base error type for raft
Variants§
Io(Error)
An IO error occurred
Store(StorageError)
A storage error occurred.
StepLocalMsg
Raft cannot step the local message.
StepPeerNotFound
The raft peer is not found and thus cannot step.
ProposalDropped
The proposal of changes was dropped.
ConfigInvalid(String)
The configuration is invalid.
CodecError(ProtobufError)
A protobuf message codec failed in some manner.
Exists
The node exists, but should not.
NotExists
The node does not exist, but should.
ConfChangeError(String)
ConfChange proposal is invalid.
RequestSnapshotDropped
The request snapshot is dropped.
Trait Implementations§
source§impl Error for Error
impl Error for Error
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<ProtobufError> for Error
impl From<ProtobufError> for Error
source§fn from(source: ProtobufError) -> Self
fn from(source: ProtobufError) -> Self
Converts to this type from the input type.
source§impl From<StorageError> for Error
impl From<StorageError> for Error
source§fn from(source: StorageError) -> Self
fn from(source: StorageError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more