Skip to main content

StreamingError

Enum StreamingError 

Source
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>

Source§

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)

Performs copy-assignment from source. Read more
Source§

impl<C, E> Debug for StreamingError<C, E>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

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>>

Fatal is considered as RPCError::Unreachable.

Source§

type InnerError = Infallible

Source§

fn decompose_infallible(self) -> Result<R, OuterError>
where Self::InnerError: Into<Infallible>, Self: Sized,

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>
where C: RaftTypeConfig, E: Error + for<'d> Deserialize<'d>,

Source§

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>

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

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>

Source§

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

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl<C, E> From<NetworkError> for StreamingError<C, E>
where C: RaftTypeConfig, E: Error,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

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,

Source§

fn from(source: Unreachable) -> StreamingError<C, E>

Converts to this type from the input type.
Source§

impl<C, E> PartialEq for StreamingError<C, E>

Source§

fn eq(&self, other: &StreamingError<C, E>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

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,

Serialize this value into the given Serde serializer. Read more
Source§

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>

§

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>
where <C as RaftTypeConfig>::NodeId: Unpin, E: Unpin, <C as RaftTypeConfig>::Node: Unpin,

§

impl<C, E> UnsafeUnpin for StreamingError<C, E>

§

impl<C, E> UnwindSafe for StreamingError<C, E>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AppData for T
where T: OptionalSend + OptionalSync + 'static + OptionalSerde,

Source§

impl<T> AppDataResponse for T
where T: OptionalSend + OptionalSync + 'static + OptionalSerde,

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> OptionalSend for T
where T: Send + ?Sized,

Source§

impl<T> OptionalSync for T
where T: Sync + ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more