pub enum StreamingError<C, E = Infallible>where
C: RaftTypeConfig,
E: Error,{
Closed(ReplicationClosed),
StorageError(StorageError<<C as RaftTypeConfig>::NodeId>),
Timeout(Timeout<<C as RaftTypeConfig>::NodeId>),
Unreachable(Unreachable),
Network(NetworkError),
RemoteError(RemoteError<<C as RaftTypeConfig>::NodeId, <C as RaftTypeConfig>::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 as RaftTypeConfig>::NodeId>)
Storage error occurs when reading local data.
Timeout(Timeout<<C as RaftTypeConfig>::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 as RaftTypeConfig>::NodeId, <C as RaftTypeConfig>::Node, E>)
Remote node returns an error.
Trait Implementations§
Source§impl<C, E> Clone for StreamingError<C, E>where
C: Clone + RaftTypeConfig,
E: Clone + Error,
<C as RaftTypeConfig>::NodeId: Clone,
<C as RaftTypeConfig>::Node: Clone,
impl<C, E> Clone for StreamingError<C, E>where
C: Clone + RaftTypeConfig,
E: Clone + Error,
<C as RaftTypeConfig>::NodeId: Clone,
<C as RaftTypeConfig>::Node: Clone,
Source§fn clone(&self) -> StreamingError<C, E>
fn clone(&self) -> StreamingError<C, E>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<C, E> Debug for StreamingError<C, E>where
C: Debug + RaftTypeConfig,
E: Debug + Error,
<C as RaftTypeConfig>::NodeId: Debug,
<C as RaftTypeConfig>::Node: Debug,
impl<C, E> Debug for StreamingError<C, E>where
C: Debug + RaftTypeConfig,
E: Debug + Error,
<C as RaftTypeConfig>::NodeId: Debug,
<C as RaftTypeConfig>::Node: Debug,
Source§impl<C, R> DecomposeResult<C, R, StreamingError<C>> for Result<R, StreamingError<C, Fatal<<C as RaftTypeConfig>::NodeId>>>where
C: RaftTypeConfig,
impl<C, R> DecomposeResult<C, R, StreamingError<C>> for Result<R, StreamingError<C, Fatal<<C as RaftTypeConfig>::NodeId>>>where
C: RaftTypeConfig,
Source§fn decompose(
self,
) -> Result<Result<R, <Result<R, StreamingError<C, Fatal<<C as RaftTypeConfig>::NodeId>>> as DecomposeResult<C, R, StreamingError<C>>>::InnerError>, StreamingError<C>>
fn decompose( self, ) -> Result<Result<R, <Result<R, StreamingError<C, Fatal<<C as RaftTypeConfig>::NodeId>>> as DecomposeResult<C, R, StreamingError<C>>>::InnerError>, StreamingError<C>>
Fatal is considered as RPCError::Unreachable.
type InnerError = Infallible
Source§fn decompose_infallible(self) -> Result<R, OuterError>
fn decompose_infallible(self) -> Result<R, OuterError>
Convert
Result<R, CompositeErr>
to Result<R, E>,
if Self::InnerError is a infallible type.Source§impl<'de, C, E> Deserialize<'de> for StreamingError<C, E>
impl<'de, C, E> Deserialize<'de> for StreamingError<C, E>
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<StreamingError<C, E>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<StreamingError<C, E>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<C, E> Display for StreamingError<C, E>where
C: RaftTypeConfig,
E: Error,
RemoteError<<C as RaftTypeConfig>::NodeId, <C as RaftTypeConfig>::Node, E>: Display,
impl<C, E> Display for StreamingError<C, E>where
C: RaftTypeConfig,
E: Error,
RemoteError<<C as RaftTypeConfig>::NodeId, <C as RaftTypeConfig>::Node, E>: Display,
impl<C, E> Eq for StreamingError<C, E>where
C: Eq + RaftTypeConfig,
E: Eq + Error,
<C as RaftTypeConfig>::NodeId: Eq,
<C as RaftTypeConfig>::Node: Eq,
Source§impl<C, E> Error for StreamingError<C, E>where
C: RaftTypeConfig,
E: Error,
RemoteError<<C as RaftTypeConfig>::NodeId, <C as RaftTypeConfig>::Node, E>: Error,
StreamingError<C, E>: Debug + Display,
impl<C, E> Error for StreamingError<C, E>where
C: RaftTypeConfig,
E: Error,
RemoteError<<C as RaftTypeConfig>::NodeId, <C as RaftTypeConfig>::Node, E>: Error,
StreamingError<C, E>: Debug + Display,
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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, E> From<NetworkError> for StreamingError<C, E>where
C: RaftTypeConfig,
E: Error,
impl<C, E> From<NetworkError> for StreamingError<C, E>where
C: RaftTypeConfig,
E: Error,
Source§fn from(source: NetworkError) -> StreamingError<C, E>
fn from(source: NetworkError) -> StreamingError<C, E>
Converts to this type from the input type.
Source§impl<C, E> From<RemoteError<<C as RaftTypeConfig>::NodeId, <C as RaftTypeConfig>::Node, E>> for StreamingError<C, E>where
C: RaftTypeConfig,
E: Error,
impl<C, E> From<RemoteError<<C as RaftTypeConfig>::NodeId, <C as RaftTypeConfig>::Node, E>> for StreamingError<C, E>where
C: RaftTypeConfig,
E: Error,
Source§fn from(
source: RemoteError<<C as RaftTypeConfig>::NodeId, <C as RaftTypeConfig>::Node, E>,
) -> StreamingError<C, E>
fn from( source: RemoteError<<C as RaftTypeConfig>::NodeId, <C as RaftTypeConfig>::Node, E>, ) -> StreamingError<C, E>
Converts to this type from the input type.
Source§impl<C, E> From<ReplicationClosed> for StreamingError<C, E>where
C: RaftTypeConfig,
E: Error,
impl<C, E> From<ReplicationClosed> for StreamingError<C, E>where
C: RaftTypeConfig,
E: Error,
Source§fn from(source: ReplicationClosed) -> StreamingError<C, E>
fn from(source: ReplicationClosed) -> StreamingError<C, E>
Converts to this type from the input type.
Source§impl<C, E> From<StorageError<<C as RaftTypeConfig>::NodeId>> for StreamingError<C, E>where
C: RaftTypeConfig,
E: Error,
impl<C, E> From<StorageError<<C as RaftTypeConfig>::NodeId>> for StreamingError<C, E>where
C: RaftTypeConfig,
E: Error,
Source§fn from(
source: StorageError<<C as RaftTypeConfig>::NodeId>,
) -> StreamingError<C, E>
fn from( source: StorageError<<C as RaftTypeConfig>::NodeId>, ) -> StreamingError<C, E>
Converts to this type from the input type.
Source§impl<C, E> From<Timeout<<C as RaftTypeConfig>::NodeId>> for StreamingError<C, E>where
C: RaftTypeConfig,
E: Error,
impl<C, E> From<Timeout<<C as RaftTypeConfig>::NodeId>> for StreamingError<C, E>where
C: RaftTypeConfig,
E: Error,
Source§fn from(source: Timeout<<C as RaftTypeConfig>::NodeId>) -> StreamingError<C, E>
fn from(source: Timeout<<C as RaftTypeConfig>::NodeId>) -> StreamingError<C, E>
Converts to this type from the input type.
Source§impl<C, E> From<Unreachable> for StreamingError<C, E>where
C: RaftTypeConfig,
E: Error,
impl<C, E> From<Unreachable> for StreamingError<C, E>where
C: RaftTypeConfig,
E: Error,
Source§fn from(source: Unreachable) -> StreamingError<C, E>
fn from(source: Unreachable) -> StreamingError<C, E>
Converts to this type from the input type.
Source§impl<C, E> PartialEq for StreamingError<C, E>where
C: PartialEq + RaftTypeConfig,
E: PartialEq + Error,
<C as RaftTypeConfig>::NodeId: PartialEq,
<C as RaftTypeConfig>::Node: PartialEq,
impl<C, E> PartialEq for StreamingError<C, E>where
C: PartialEq + RaftTypeConfig,
E: PartialEq + Error,
<C as RaftTypeConfig>::NodeId: PartialEq,
<C as RaftTypeConfig>::Node: PartialEq,
Source§fn eq(&self, other: &StreamingError<C, E>) -> bool
fn eq(&self, other: &StreamingError<C, E>) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl<C, E> Serialize for StreamingError<C, E>
impl<C, E> Serialize for StreamingError<C, E>
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<C, E> StructuralPartialEq for StreamingError<C, E>where
C: RaftTypeConfig,
E: Error,
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> UnsafeUnpin for StreamingError<C, E>where
<C as RaftTypeConfig>::NodeId: UnsafeUnpin,
E: UnsafeUnpin,
<C as RaftTypeConfig>::Node: UnsafeUnpin,
impl<C, E> UnwindSafe for StreamingError<C, E>where
<C as RaftTypeConfig>::NodeId: UnwindSafe,
E: UnwindSafe,
<C as RaftTypeConfig>::Node: UnwindSafe,
Blanket Implementations§
impl<T> AppData for Twhere
T: OptionalSend + OptionalSync + 'static + OptionalSerde,
impl<T> AppDataResponse for Twhere
T: OptionalSend + OptionalSync + 'static + OptionalSerde,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more