Enum RemoteError
#[non_exhaustive]pub enum RemoteError<E> {
Exchange(E),
Codec(CodecError),
#[non_exhaustive] EventTooLarge {
id: EventId,
len: usize,
limit: usize,
},
#[non_exhaustive] TooManyEvents {
actual: usize,
limit: usize,
},
#[non_exhaustive] BatchTooLarge {
actual: usize,
limit: usize,
},
}Expand description
How a RemoteSyncPeer fails: its transport E, bytes it could not
write or read, or a push over the limits it declared, which it refuses
without sending. The limit arms mirror
StorePeerError’s, so a runner reads one shape.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Exchange(E)
The exchange failed; the transport’s error states the class, so a refusal the far side reported keeps the class it had there.
Codec(CodecError)
The request did not encode or the reply did not decode.
Stop.
#[non_exhaustive]EventTooLarge
One event is larger than the
max_event_bytes this client declared
for its far side, so no split can carry it:
Park. Refused before anything was sent.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]TooManyEvents
The push carries more events than the
max_batch_events this client declared
for its far side: Split. Refused before
anything was sent.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]BatchTooLarge
The push carries more payload bytes than the
max_batch_bytes this client declared
for its far side: Split. Refused before
anything was sent.
Fields
This variant is marked as non-exhaustive
Trait Implementations§
§impl<E: Classify> Classify for RemoteError<E>
The transport’s and the codec’s arms ask their errors; the limit arms are
fixed by the arm, as StorePeerError’s are (SY-36).
impl<E: Classify> Classify for RemoteError<E>
The transport’s and the codec’s arms ask their errors; the limit arms are
fixed by the arm, as StorePeerError’s are (SY-36).
§fn class(&self) -> FailureClass
fn class(&self) -> FailureClass
§impl<E: Debug> Debug for RemoteError<E>
impl<E: Debug> Debug for RemoteError<E>
§impl<E> Display for RemoteError<E>
impl<E> Display for RemoteError<E>
§impl<E> Error for RemoteError<E>
impl<E> Error for RemoteError<E>
§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()