pub enum ReplicationError {
Show 14 variants
Protocol(String),
Buffer(String),
TransientConnection(String),
PermanentConnection(String),
ReplicationConnection(String),
Authentication(String),
ReplicationSlot(String),
Timeout(String),
Cancelled(String),
Config(String),
Io(Error),
StringConversion(NulError),
Generic(String),
Deserialize(String),
}Expand description
Comprehensive error types for replication operations
Variants§
Protocol(String)
Protocol parsing errors
Buffer(String)
Buffer operation errors
TransientConnection(String)
Connection errors that can be retried (transient)
PermanentConnection(String)
Connection errors that should not be retried (permanent)
ReplicationConnection(String)
Replication connection errors
Authentication(String)
Authentication errors
ReplicationSlot(String)
Replication slot errors
Timeout(String)
Timeout errors
Cancelled(String)
Operation cancelled errors
Config(String)
Configuration errors
Io(Error)
IO errors
StringConversion(NulError)
String conversion errors (from CString operations)
Generic(String)
Generic replication errors
Deserialize(String)
Deserialization errors (when converting RowData to user types)
Implementations§
Source§impl ReplicationError
impl ReplicationError
Sourcepub fn transient_connection<S: Into<String>>(msg: S) -> Self
pub fn transient_connection<S: Into<String>>(msg: S) -> Self
Create a new transient connection error (can be retried)
Sourcepub fn permanent_connection<S: Into<String>>(msg: S) -> Self
pub fn permanent_connection<S: Into<String>>(msg: S) -> Self
Create a new permanent connection error (should not be retried)
Sourcepub fn replication_connection<S: Into<String>>(msg: S) -> Self
pub fn replication_connection<S: Into<String>>(msg: S) -> Self
Create a new replication connection error
Sourcepub fn connection<S: Into<String>>(msg: S) -> Self
pub fn connection<S: Into<String>>(msg: S) -> Self
Create a new connection error (alias for replication_connection)
Sourcepub fn authentication<S: Into<String>>(msg: S) -> Self
pub fn authentication<S: Into<String>>(msg: S) -> Self
Create a new authentication error
Sourcepub fn replication_slot<S: Into<String>>(msg: S) -> Self
pub fn replication_slot<S: Into<String>>(msg: S) -> Self
Create a new replication slot error
Sourcepub fn deserialize<S: Into<String>>(msg: S) -> Self
pub fn deserialize<S: Into<String>>(msg: S) -> Self
Create a new deserialization error
Sourcepub fn is_transient(&self) -> bool
pub fn is_transient(&self) -> bool
Check if the error is transient (can be retried)
Sourcepub fn is_permanent(&self) -> bool
pub fn is_permanent(&self) -> bool
Check if the error is permanent (should not be retried)
Sourcepub fn is_cancelled(&self) -> bool
pub fn is_cancelled(&self) -> bool
Check if the error is due to cancellation
Trait Implementations§
Source§impl Debug for ReplicationError
impl Debug for ReplicationError
Source§impl Display for ReplicationError
impl Display for ReplicationError
Source§impl Error for ReplicationError
impl Error for ReplicationError
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
use the Display impl or to_string()
Source§impl Error for ReplicationError
impl Error for ReplicationError
Source§fn custom<T: Display>(msg: T) -> Self
fn custom<T: Display>(msg: T) -> Self
Source§fn invalid_type(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self
fn invalid_type(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self
Deserialize receives a type different from what it was
expecting. Read moreSource§fn invalid_value(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self
fn invalid_value(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self
Deserialize receives a value of the right type but that
is wrong for some other reason. Read moreSource§fn invalid_length(len: usize, exp: &dyn Expected) -> Self
fn invalid_length(len: usize, exp: &dyn Expected) -> Self
Source§fn unknown_variant(variant: &str, expected: &'static [&'static str]) -> Self
fn unknown_variant(variant: &str, expected: &'static [&'static str]) -> Self
Deserialize enum type received a variant with an
unrecognized name.Source§fn unknown_field(field: &str, expected: &'static [&'static str]) -> Self
fn unknown_field(field: &str, expected: &'static [&'static str]) -> Self
Deserialize struct type received a field with an
unrecognized name.Source§fn missing_field(field: &'static str) -> Self
fn missing_field(field: &'static str) -> Self
Deserialize struct type expected to receive a required
field with a particular name but that field was not present in the
input.Source§fn duplicate_field(field: &'static str) -> Self
fn duplicate_field(field: &'static str) -> Self
Deserialize struct type received more than one of the
same field.