#[non_exhaustive]pub enum SyncError {
Connection(TransportError),
Protocol(String),
Ended(Reason),
WrongCode,
NotAReplica,
Declined,
HoldsSpace,
Holder(Box<dyn Error + Sync + Send>),
}Expand description
Why pairing or syncing failed.
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.
Connection(TransportError)
The connection failed.
Protocol(String)
The other side sent what the protocol does not allow then.
Ended(Reason)
The other side ended the connection.
WrongCode
The pairing code did not match: this side found so, or, in pairing and invitations, the other side said so.
NotAReplica
The other side is no replica that this replica syncs with.
Declined
The person who invites declined the one who asked, on this side.
HoldsSpace
This side’s library holds the space that it was invited to already.
Holder(Box<dyn Error + Sync + Send>)
Reading or writing this replica’s data failed.
Trait Implementations§
Source§impl Error for SyncError
impl Error for SyncError
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 From<TransportError> for SyncError
impl From<TransportError> for SyncError
Source§fn from(source: TransportError) -> SyncError
fn from(source: TransportError) -> SyncError
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for SyncError
impl !UnwindSafe for SyncError
impl Forget for SyncError
impl Freeze for SyncError
impl Move for SyncError
impl Send for SyncError
impl Sync for SyncError
impl Unpin for SyncError
impl UnsafeUnpin for SyncError
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