Skip to main content

SyncError

Enum SyncError 

Source
pub enum SyncError {
Show 27 variants IncompatiblePeer, TransportFailed(String), TransportTimeout(String), HttpStatus(u16), EmptyHttpResponse, EmptyRequestBody, RequestBodyTooLarge { size: usize, max: usize, }, ResponseTooLarge { max: usize, }, TooManyEvents { count: usize, max: usize, }, InvalidSequence(u64), SequenceConflict(u64), SnapshotUnsupported, InvalidSnapshot(&'static str), InvalidPeerId, InvalidPeerAddress, UnsupportedPeerScheme, DnsResolutionFailed(String), TlsFailed(String), LogIndexOutOfBounds { index: usize, len: usize, }, LockPoisoned(&'static str), InvalidSyncMessage(&'static str), InvalidEventHex, CorruptReplicationLog { line: usize, reason: &'static str, }, CorruptOutbox { line: usize, }, ElectionFailed(String), ReplicationFailed(String), PeerNotFound(String),
}
Expand description

Sync-local typed errors.

Variants§

§

IncompatiblePeer

The remote peer does not share the local application sync identity.

§

TransportFailed(String)

A transport operation failed for the supplied reason.

§

TransportTimeout(String)

A transport operation exceeded its configured deadline.

§

HttpStatus(u16)

The remote HTTP endpoint returned a non-success status.

§

EmptyHttpResponse

The remote endpoint closed the connection without a response.

§

EmptyRequestBody

A sync request did not contain a body.

§

RequestBodyTooLarge

An outbound request exceeded the configured byte limit.

Fields

§size: usize

Actual encoded body size in bytes.

§max: usize

Maximum accepted body size in bytes.

§

ResponseTooLarge

An inbound response exceeded the configured byte limit.

Fields

§max: usize

Maximum accepted response size in bytes.

§

TooManyEvents

A batch contained more events than the receiver accepts.

Fields

§count: usize

Number of events found in the batch.

§max: usize

Maximum accepted event count.

§

InvalidSequence(u64)

A sequence does not continue or validly overlap the checkpoint.

§

SequenceConflict(u64)

A sequence already exists with different payload bytes.

§

SnapshotUnsupported

The selected replication log does not implement snapshots.

§

InvalidSnapshot(&'static str)

A snapshot failed integrity or structural validation.

§

InvalidPeerId

A peer identifier is empty or contains unsupported characters.

§

InvalidPeerAddress

A peer seed cannot be parsed as a supported host and port.

§

UnsupportedPeerScheme

A peer seed uses a transport scheme unsupported by sync.

§

DnsResolutionFailed(String)

A DNS seed could not be resolved.

§

TlsFailed(String)

TLS setup or negotiation failed.

§

LogIndexOutOfBounds

A replication-log read started beyond the current log length.

Fields

§index: usize

Requested zero-based offset.

§len: usize

Current log length.

§

LockPoisoned(&'static str)

A synchronization primitive was poisoned.

§

InvalidSyncMessage(&'static str)

A wire message violated a sync invariant.

§

InvalidEventHex

An event payload is not valid hexadecimal data.

§

CorruptReplicationLog

A durable replication-log record is malformed.

Fields

§line: usize

One-based line containing the invalid record.

§reason: &'static str

Stable description of the violated record format.

§

CorruptOutbox

A durable outbox record is malformed.

Fields

§line: usize

One-based line containing the invalid record.

§

ElectionFailed(String)

Leader-election state could not be advanced.

§

ReplicationFailed(String)

Replication persistence or application failed.

§

PeerNotFound(String)

A requested peer is absent from the current directory.

Trait Implementations§

Source§

impl Clone for SyncError

Source§

fn clone(&self) -> SyncError

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 Debug for SyncError

Source§

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

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

impl Eq for SyncError

Source§

impl PartialEq for SyncError

Source§

fn eq(&self, other: &SyncError) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for SyncError

Auto Trait Implementations§

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> 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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> Same for T

Source§

type Output = T

Should always be Self
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, 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.