Enum scylla::transport::errors::ConnectionError
source · #[non_exhaustive]pub enum ConnectionError {
ConnectTimeout,
IoError(Arc<Error>),
NoSourcePortForShard(u32),
TranslationError(TranslationError),
BrokenConnection(BrokenConnectionError),
ConnectionSetupRequestError(ConnectionSetupRequestError),
}
Expand description
An error that appeared on a connection level. It indicated that connection can no longer be used and should be dropped.
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.
ConnectTimeout
Provided connect timeout elapsed.
IoError(Arc<Error>)
Input/Output error occurred.
NoSourcePortForShard(u32)
Driver was unable to find a free source port for given shard.
TranslationError(TranslationError)
Failed to translate an address before establishing a connection.
BrokenConnection(BrokenConnectionError)
A connection has been broken after being established.
ConnectionSetupRequestError(ConnectionSetupRequestError)
A request required to initialize a connection failed.
Implementations§
source§impl ConnectionError
impl ConnectionError
Checks if this error indicates that a chosen source port/address cannot be bound. This is caused by one of the following:
- The source address is already used by another socket,
- The source address is reserved and the process does not have sufficient privileges to use it.
Trait Implementations§
source§impl Clone for ConnectionError
impl Clone for ConnectionError
source§fn clone(&self) -> ConnectionError
fn clone(&self) -> ConnectionError
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ConnectionError
impl Debug for ConnectionError
source§impl Display for ConnectionError
impl Display for ConnectionError
source§impl Error for ConnectionError
impl Error for ConnectionError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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<BrokenConnectionError> for ConnectionError
impl From<BrokenConnectionError> for ConnectionError
source§fn from(source: BrokenConnectionError) -> Self
fn from(source: BrokenConnectionError) -> Self
Converts to this type from the input type.
source§impl From<ConnectionSetupRequestError> for ConnectionError
impl From<ConnectionSetupRequestError> for ConnectionError
source§fn from(source: ConnectionSetupRequestError) -> Self
fn from(source: ConnectionSetupRequestError) -> Self
Converts to this type from the input type.
source§impl From<Error> for ConnectionError
impl From<Error> for ConnectionError
source§impl From<TranslationError> for ConnectionError
impl From<TranslationError> for ConnectionError
source§fn from(source: TranslationError) -> Self
fn from(source: TranslationError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !Freeze for ConnectionError
impl !RefUnwindSafe for ConnectionError
impl Send for ConnectionError
impl Sync for ConnectionError
impl Unpin for ConnectionError
impl !UnwindSafe for ConnectionError
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§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>
Converts
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>
Converts
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