pub struct CaptureSession { /* private fields */ }Expand description
Owns microphone capture and its recognition session. Stopping drains the capture ring first.
Implementations§
Source§impl CaptureSession
impl CaptureSession
pub fn start(engine: &Engine, options: SessionOptions) -> Result<Self, AsrError>
Sourcepub fn subscribe(&self) -> Option<Subscription>
pub fn subscribe(&self) -> Option<Subscription>
Subscribes to the underlying session; see Session::subscribe for
the one-shot guarantees (at most one success per session, and dropping
the Subscription does not free the slot for re-subscription).
pub fn cancel(&mut self)
pub fn finish(&mut self, deadline: Instant) -> SessionResult
Trait Implementations§
Source§impl Drop for CaptureSession
impl Drop for CaptureSession
Auto Trait Implementations§
impl !RefUnwindSafe for CaptureSession
impl !Sync for CaptureSession
impl !UnwindSafe for CaptureSession
impl Forget for CaptureSession
impl Freeze for CaptureSession
impl Move for CaptureSession
impl Send for CaptureSession
impl Unpin for CaptureSession
impl UnsafeUnpin for CaptureSession
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