pub struct Session {
pub events: Receiver<AppEvent>,
pub phone: Box<dyn Phone>,
pub header_poll: Option<Box<dyn Fn() -> Option<InviteHeaders> + Send + Sync>>,
pub handle: Box<dyn Send>,
}Expand description
A live backend session. Dropping this tears down the backend (stops the process / closes the library) and cleans up resources.
Fields§
§events: Receiver<AppEvent>Event stream (already translated to backend-neutral AppEvents).
phone: Box<dyn Phone>Phone command interface.
header_poll: Option<Box<dyn Fn() -> Option<InviteHeaders> + Send + Sync>>Poll for inbound INVITE headers. Returns None when there is nothing
new; Some(headers) when new headers have been parsed. None on the
closure itself means the backend exposes headers directly in events
(no trace polling needed).
handle: Box<dyn Send>Opaque handle — drop ends the backend session + cleanup.
Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Session
impl !Sync for Session
impl !UnwindSafe for Session
impl Freeze for Session
impl Send for Session
impl Unpin for Session
impl UnsafeUnpin for Session
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