Skip to main content

SessionDialogOps

Trait SessionDialogOps 

Source
pub trait SessionDialogOps {
    // Required methods
    fn refresh(
        &self,
        headers: Vec<Header>,
        body: Option<Vec<u8>>,
    ) -> impl Future<Output = Result<Option<Response>, Box<dyn Error + Send + Sync>>> + Send;
    fn send_bye(
        &self,
    ) -> impl Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send;
}
Expand description

The dialog operations session_timer_loop needs, abstracted so the loop’s timing logic stays unit-testable without a live dialog.

Implemented for ClientInviteDialog and ServerInviteDialog over their reinvite / bye methods.

Required Methods§

Source

fn refresh( &self, headers: Vec<Header>, body: Option<Vec<u8>>, ) -> impl Future<Output = Result<Option<Response>, Box<dyn Error + Send + Sync>>> + Send

Send a session-refresh re-INVITE with the given extra headers and (typically SDP) body. Returns the final response, or Ok(None) if the dialog is no longer confirmed.

Source

fn send_bye( &self, ) -> impl Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send

Hang up the dialog with BYE.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl SessionDialogOps for ClientInviteDialog

Source§

async fn refresh( &self, headers: Vec<Header>, body: Option<Vec<u8>>, ) -> Result<Option<Response>, Box<dyn Error + Send + Sync>>

Source§

async fn send_bye(&self) -> Result<(), Box<dyn Error + Send + Sync>>

Source§

impl SessionDialogOps for ServerInviteDialog

Source§

async fn refresh( &self, headers: Vec<Header>, body: Option<Vec<u8>>, ) -> Result<Option<Response>, Box<dyn Error + Send + Sync>>

Source§

async fn send_bye(&self) -> Result<(), Box<dyn Error + Send + Sync>>

Implementors§