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 crate::Call’s shareable session handle over the engine’s in-dialog re-INVITE / BYE.

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".

Implementors§