Enum ServeError
#[non_exhaustive]pub enum ServeError<R, W, A = Infallible> {
Codec(CodecError),
Token(ForeignToken),
Peer(StorePeerError<R, W, A>),
}Expand description
Why serve_sync or serve_sync_adjudicated could not answer.
Generic over the store’s read error R, its ingest error W and the
peer’s merge rule’s error A, as StorePeerError is, and bounded
nowhere on the enum, so it is Send exactly when they are. A defaults
to Infallible, so ServeError<R, W> is still serve_sync’s error.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Codec(CodecError)
The request did not decode, or the reply did not encode.
Stop.
Token(ForeignToken)
A pull resumed from a token no store peer minted.
Stop.
Peer(StorePeerError<R, W, A>)
The peer refused or failed; its error states the class.
Trait Implementations§
§impl<R: Classify, W: Classify, A: Classify> Classify for ServeError<R, W, A>
impl<R: Classify, W: Classify, A: Classify> Classify for ServeError<R, W, A>
§fn class(&self) -> FailureClass
fn class(&self) -> FailureClass
The remedy this failure calls for.
§impl<R, W, A> Display for ServeError<R, W, A>where
StorePeerError<R, W, A>: Display,
impl<R, W, A> Display for ServeError<R, W, A>where
StorePeerError<R, W, A>: Display,
§impl<R, W, A> Error for ServeError<R, W, A>
impl<R, W, A> Error for ServeError<R, W, A>
§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()
§impl<R, W, A> From<CodecError> for ServeError<R, W, A>
impl<R, W, A> From<CodecError> for ServeError<R, W, A>
§fn from(source: CodecError) -> Self
fn from(source: CodecError) -> Self
Converts to this type from the input type.
§impl<R, W, A> From<ForeignToken> for ServeError<R, W, A>
impl<R, W, A> From<ForeignToken> for ServeError<R, W, A>
§fn from(source: ForeignToken) -> Self
fn from(source: ForeignToken) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<R, W, A> Freeze for ServeError<R, W, A>where
StorePeerError<R, W, A>: Freeze,
impl<R, W, A> RefUnwindSafe for ServeError<R, W, A>where
StorePeerError<R, W, A>: RefUnwindSafe,
impl<R, W, A> Send for ServeError<R, W, A>where
StorePeerError<R, W, A>: Send,
impl<R, W, A> Sync for ServeError<R, W, A>where
StorePeerError<R, W, A>: Sync,
impl<R, W, A> Unpin for ServeError<R, W, A>where
StorePeerError<R, W, A>: Unpin,
impl<R, W, A> UnsafeUnpin for ServeError<R, W, A>where
StorePeerError<R, W, A>: UnsafeUnpin,
impl<R, W, A> UnwindSafe for ServeError<R, W, A>where
StorePeerError<R, W, A>: 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