Enum openraft::error::StreamingError
source · pub enum StreamingError<C: RaftTypeConfig, E: Error> {
Closed(ReplicationClosed),
StorageError(StorageError<C::NodeId>),
Timeout(Timeout<C::NodeId>),
Unreachable(Unreachable),
Network(NetworkError),
RemoteError(RemoteError<C::NodeId, C::Node, E>),
}
Expand description
Error occurred when streaming local data to a remote raft node.
Thus this error includes storage error, network error, and remote error.
Variants§
Closed(ReplicationClosed)
The replication stream is closed intentionally.
StorageError(StorageError<C::NodeId>)
Storage error occurs when reading local data.
Timeout(Timeout<C::NodeId>)
Timeout when streaming data to remote node.
Unreachable(Unreachable)
The node is temporarily unreachable and should backoff before retrying.
Network(NetworkError)
Failed to send the RPC request and should retry immediately.
RemoteError(RemoteError<C::NodeId, C::Node, E>)
Remote node returns an error.
Trait Implementations§
source§impl<C: Clone + RaftTypeConfig, E: Clone + Error> Clone for StreamingError<C, E>
impl<C: Clone + RaftTypeConfig, E: Clone + Error> Clone for StreamingError<C, E>
source§fn clone(&self) -> StreamingError<C, E>
fn clone(&self) -> StreamingError<C, E>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<C: Debug + RaftTypeConfig, E: Debug + Error> Debug for StreamingError<C, E>
impl<C: Debug + RaftTypeConfig, E: Debug + Error> Debug for StreamingError<C, E>
source§impl<'de, C: RaftTypeConfig, E> Deserialize<'de> for StreamingError<C, E>where
E: for<'d> Deserialize<'d> + Error,
impl<'de, C: RaftTypeConfig, E> Deserialize<'de> for StreamingError<C, E>where
E: for<'d> Deserialize<'d> + Error,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<C: RaftTypeConfig, E: Error> Display for StreamingError<C, E>
impl<C: RaftTypeConfig, E: Error> Display for StreamingError<C, E>
source§impl<C: RaftTypeConfig, E: Error> Error for StreamingError<C, E>
impl<C: RaftTypeConfig, E: Error> Error for StreamingError<C, E>
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<C: RaftTypeConfig, E: Error> From<NetworkError> for StreamingError<C, E>
impl<C: RaftTypeConfig, E: Error> From<NetworkError> for StreamingError<C, E>
source§fn from(source: NetworkError) -> Self
fn from(source: NetworkError) -> Self
Converts to this type from the input type.
source§impl<C: RaftTypeConfig, E: Error> From<RemoteError<<C as RaftTypeConfig>::NodeId, <C as RaftTypeConfig>::Node, E>> for StreamingError<C, E>
impl<C: RaftTypeConfig, E: Error> From<RemoteError<<C as RaftTypeConfig>::NodeId, <C as RaftTypeConfig>::Node, E>> for StreamingError<C, E>
source§impl<C: RaftTypeConfig, E: Error> From<ReplicationClosed> for StreamingError<C, E>
impl<C: RaftTypeConfig, E: Error> From<ReplicationClosed> for StreamingError<C, E>
source§fn from(source: ReplicationClosed) -> Self
fn from(source: ReplicationClosed) -> Self
Converts to this type from the input type.
source§impl<C: RaftTypeConfig, E: Error> From<StorageError<<C as RaftTypeConfig>::NodeId>> for StreamingError<C, E>
impl<C: RaftTypeConfig, E: Error> From<StorageError<<C as RaftTypeConfig>::NodeId>> for StreamingError<C, E>
source§fn from(source: StorageError<C::NodeId>) -> Self
fn from(source: StorageError<C::NodeId>) -> Self
Converts to this type from the input type.
source§impl<C: RaftTypeConfig, E: Error> From<Timeout<<C as RaftTypeConfig>::NodeId>> for StreamingError<C, E>
impl<C: RaftTypeConfig, E: Error> From<Timeout<<C as RaftTypeConfig>::NodeId>> for StreamingError<C, E>
source§impl<C: RaftTypeConfig, E: Error> From<Unreachable> for StreamingError<C, E>
impl<C: RaftTypeConfig, E: Error> From<Unreachable> for StreamingError<C, E>
source§fn from(source: Unreachable) -> Self
fn from(source: Unreachable) -> Self
Converts to this type from the input type.
source§impl<C: PartialEq + RaftTypeConfig, E: PartialEq + Error> PartialEq for StreamingError<C, E>
impl<C: PartialEq + RaftTypeConfig, E: PartialEq + Error> PartialEq for StreamingError<C, E>
source§fn eq(&self, other: &StreamingError<C, E>) -> bool
fn eq(&self, other: &StreamingError<C, E>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<C: RaftTypeConfig, E> Serialize for StreamingError<C, E>
impl<C: RaftTypeConfig, E> Serialize for StreamingError<C, E>
impl<C: Eq + RaftTypeConfig, E: Eq + Error> Eq for StreamingError<C, E>
impl<C: RaftTypeConfig, E: Error> StructuralPartialEq for StreamingError<C, E>
Auto Trait Implementations§
impl<C, E> Freeze for StreamingError<C, E>
impl<C, E> RefUnwindSafe for StreamingError<C, E>where
<C as RaftTypeConfig>::NodeId: RefUnwindSafe,
E: RefUnwindSafe,
<C as RaftTypeConfig>::Node: RefUnwindSafe,
impl<C, E> Send for StreamingError<C, E>where
E: Send,
impl<C, E> Sync for StreamingError<C, E>where
E: Sync,
impl<C, E> Unpin for StreamingError<C, E>
impl<C, E> UnwindSafe for StreamingError<C, E>where
<C as RaftTypeConfig>::NodeId: UnwindSafe,
E: UnwindSafe,
<C as RaftTypeConfig>::Node: UnwindSafe,
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