pub enum TransactionEvent {
Received(SipMessage, Option<SipConnection>),
Timer(TransactionTimer),
Respond(Response),
Terminate,
}Expand description
SIP Transaction Events
TransactionEvent represents the various events that can occur during
a SIP transaction’s lifecycle. These events drive the transaction state machine
and coordinate between the transaction layer and transaction users.
§Events
Received- A SIP message was received for this transactionTimer- A transaction timer has firedRespond- Request to send a response (server transactions only)Terminate- Request to terminate the transaction
§Examples
use ftth_rsipstack::transaction::transaction::TransactionEvent;
use rsip::SipMessage;
match event {
TransactionEvent::Received(msg, conn) => {
// Process received SIP message
},
TransactionEvent::Timer(timer) => {
// Handle timer expiration
},
TransactionEvent::Respond(response) => {
// Send response
},
TransactionEvent::Terminate => {
// Clean up transaction
}
}Variants§
Auto Trait Implementations§
impl Freeze for TransactionEvent
impl !RefUnwindSafe for TransactionEvent
impl Send for TransactionEvent
impl Sync for TransactionEvent
impl Unpin for TransactionEvent
impl !UnwindSafe for TransactionEvent
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