pub enum Error {
Show 13 variants
SipCoreError(Error),
TransportError {
source: TransportErrorWrapper,
context: Option<String>,
},
TransactionNotFound {
key: TransactionKey,
context: String,
},
TransactionExists {
key: TransactionKey,
kind: TransactionKind,
},
InvalidStateTransition {
transaction_kind: TransactionKind,
from_state: TransactionState,
to_state: TransactionState,
transaction_id: Option<TransactionKey>,
},
TransactionTimeout {
key: TransactionKey,
timer: String,
},
TimerError {
message: String,
},
Io(Error),
ChannelError {
context: String,
},
TransactionCreationError {
message: String,
},
MessageProcessingError {
message: String,
transaction_id: Option<TransactionKey>,
},
Transport(String),
Other(String),
}Expand description
Errors that can occur in SIP transaction handling
Variants§
SipCoreError(Error)
Error originating from the sip-core crate (parsing, building messages, etc.)
TransportError
Error originating from the sip-transport crate.
TransactionNotFound
Transaction not found for the given key.
TransactionExists
Transaction with the given key already exists.
InvalidStateTransition
Invalid transaction state transition attempted.
Fields
§
transaction_kind: TransactionKind§
from_state: TransactionState§
to_state: TransactionState§
transaction_id: Option<TransactionKey>TransactionTimeout
Transaction timed out (specific timers T_B, T_F, T_H).
TimerError
Timer error
Io(Error)
I/O error.
ChannelError
Internal channel error (e.g., receiver dropped).
TransactionCreationError
Transaction creation error
MessageProcessingError
Transaction message processing error
Transport(String)
Transport manager error
Other(String)
Other miscellaneous errors.
Implementations§
Source§impl Error
impl Error
Sourcepub fn transaction_not_found(
key: TransactionKey,
context: impl Into<String>,
) -> Self
pub fn transaction_not_found( key: TransactionKey, context: impl Into<String>, ) -> Self
Create a new TransactionNotFound error with context
Sourcepub fn transport_error(source: Error, context: impl Into<String>) -> Self
pub fn transport_error(source: Error, context: impl Into<String>) -> Self
Create a new TransportError with context
Sourcepub fn invalid_state_transition(
transaction_kind: TransactionKind,
from_state: TransactionState,
to_state: TransactionState,
transaction_id: Option<TransactionKey>,
) -> Self
pub fn invalid_state_transition( transaction_kind: TransactionKind, from_state: TransactionState, to_state: TransactionState, transaction_id: Option<TransactionKey>, ) -> Self
Create a new InvalidStateTransition error
Sourcepub fn channel_error(context: impl Into<String>) -> Self
pub fn channel_error(context: impl Into<String>) -> Self
Create a new ChannelError with context
Sourcepub fn transaction_timeout(
key: TransactionKey,
timer: impl Into<String>,
) -> Self
pub fn transaction_timeout( key: TransactionKey, timer: impl Into<String>, ) -> Self
Create a new TransactionTimeout error
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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