#[non_exhaustive]pub enum SyncError {
Show 35 variants
NoTransportEnabled,
ServerAlreadyRunning {
address: String,
},
ServerNotRunning,
UnexpectedResponse {
expected: &'static str,
actual: String,
},
Network(String),
CommandSendError(String),
TransportInit(String),
RuntimeCreation(String),
ServerBind {
address: String,
reason: String,
},
ConnectionFailed {
address: String,
reason: String,
},
DeviceKeyNotFound {
key_name: String,
},
UnsupportedTransport {
transport_type: String,
},
InvalidAddress(String),
PeerNotFound(String),
PeerAlreadyExists(String),
SerializationError(String),
ProtocolMismatch {
expected: u32,
received: u32,
},
HandshakeFailed(String),
EntryNotFound(ID),
InvalidEntry(String),
SyncProtocolError(String),
BackendError(String),
RequestNotFound(String),
RequestAlreadyExists(String),
InvalidRequestState {
request_id: String,
current_status: String,
expected_status: String,
},
InvalidData(String),
InsufficientPermission {
request_id: String,
required_permission: String,
actual_permission: Permission,
},
InvalidPublicKey {
reason: String,
},
InvalidKeyName {
reason: String,
},
InstanceDropped,
BootstrapPending {
request_id: String,
message: String,
},
TransportTypeMismatch {
name: String,
expected: String,
found: String,
},
TransportNotFound {
name: String,
},
NoTransportForAddress {
address: Address,
},
MultipleTransportErrors {
errors: Vec<String>,
},
}Expand description
Errors that can occur during synchronization operations.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NoTransportEnabled
No transport has been enabled for network operations.
ServerAlreadyRunning
Attempted to start a server when one is already running.
ServerNotRunning
Attempted to stop a server when none is running.
UnexpectedResponse
Unexpected response type received from peer.
Network(String)
Network communication error.
CommandSendError(String)
Command channel send error.
TransportInit(String)
Transport initialization error.
RuntimeCreation(String)
Runtime creation error for async operations.
ServerBind
Server bind error.
ConnectionFailed
Client connection error.
DeviceKeyNotFound
Device key not found in backend storage.
UnsupportedTransport
Transport type not supported by this transport implementation.
InvalidAddress(String)
Invalid address format.
PeerNotFound(String)
Peer not found.
PeerAlreadyExists(String)
Peer already exists.
SerializationError(String)
Serialization error.
ProtocolMismatch
Protocol version mismatch.
HandshakeFailed(String)
Handshake failed.
EntryNotFound(ID)
Entry not found in backend storage.
InvalidEntry(String)
Invalid entry received (validation failed).
SyncProtocolError(String)
Sync protocol error.
BackendError(String)
Backend storage error.
RequestNotFound(String)
Bootstrap request not found.
RequestAlreadyExists(String)
Bootstrap request already exists.
InvalidRequestState
Invalid bootstrap request state.
InvalidData(String)
Invalid data format in stored bootstrap request.
InsufficientPermission
Insufficient permission for the requested operation.
InvalidPublicKey
Invalid public key provided.
InvalidKeyName
Invalid key name provided.
InstanceDropped
Instance has been dropped and is no longer available.
BootstrapPending
Bootstrap request is pending manual approval.
TransportTypeMismatch
Transport configuration type mismatch.
TransportNotFound
Transport not found by name.
NoTransportForAddress
No transport can handle the given address.
MultipleTransportErrors
Multiple transport operations failed.
Implementations§
Source§impl SyncError
impl SyncError
Sourcepub fn is_configuration_error(&self) -> bool
pub fn is_configuration_error(&self) -> bool
Check if this is a configuration error (no transport enabled).
Sourcepub fn is_server_error(&self) -> bool
pub fn is_server_error(&self) -> bool
Check if this is a server lifecycle error.
Sourcepub fn is_network_error(&self) -> bool
pub fn is_network_error(&self) -> bool
Check if this is a network/connection error.
Sourcepub fn is_protocol_error(&self) -> bool
pub fn is_protocol_error(&self) -> bool
Check if this is a protocol error (unexpected response).
Sourcepub fn is_not_found(&self) -> bool
pub fn is_not_found(&self) -> bool
Check if this is a not found error.
Sourcepub fn is_validation_error(&self) -> bool
pub fn is_validation_error(&self) -> bool
Check if this is a validation error.
Sourcepub fn is_backend_error(&self) -> bool
pub fn is_backend_error(&self) -> bool
Check if this is a backend error.
Trait Implementations§
Source§impl Error for SyncError
impl Error for SyncError
1.30.0 · Source§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
Auto Trait Implementations§
impl Freeze for SyncError
impl RefUnwindSafe for SyncError
impl Send for SyncError
impl Sync for SyncError
impl Unpin for SyncError
impl UnwindSafe 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
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.