pub struct Session { /* private fields */ }Implementations§
Source§impl Session
impl Session
pub fn input(&self) -> AudioInput
Sourcepub fn subscribe(&self) -> Option<Subscription>
pub fn subscribe(&self) -> Option<Subscription>
Returns the session’s single self-healing live view subscription.
The first read on the returned subscription is always
Update::Reset carrying the current session state; afterwards
updates are buffered up to event_capacity and a slow reader
self-heals with a fresh Update::Reset instead of losing the
transcript.
§Guarantees
- At most one
subscribe()call succeeds per session. The slot is claimed atomically under the session lock and is never released. - Every later call returns
None;subscribe()does not return an error and does not panic on repeated calls. - Dropping the
Subscriptiondisables the update queue (updates are no longer buffered; the session itself keeps running and is unaffected), but it does not reset the subscription slot, sosubscribe()cannot succeed again afterwards. A host that needs to keep receiving updates must keep itsSubscriptionalive for the rest of the session.
pub fn cancel(&self)
pub fn finish(&self, deadline: Instant) -> SessionResult
Trait Implementations§
Auto Trait Implementations§
impl Forget for Session
impl Freeze for Session
impl Move for Session
impl RefUnwindSafe for Session
impl Send for Session
impl Sync for Session
impl Unpin for Session
impl UnsafeUnpin for Session
impl UnwindSafe 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