pub struct Session { /* private fields */ }Expand description
A capture session: owns the frame source, the capture loop, and all
watcher tasks. Dropping the last Session handle stops everything.
Implementations§
Source§impl Session
impl Session
pub fn builder() -> SessionBuilder
Sourcepub fn watch(&self, name: &str) -> WatcherBuilder<'_>
pub fn watch(&self, name: &str) -> WatcherBuilder<'_>
Begin configuring a watcher. Call .subscribe() on the returned
builder to register it and get its event stream.
Sourcepub fn unsubscribe(&self, name: &str) -> bool
pub fn unsubscribe(&self, name: &str) -> bool
Remove a watcher by name, aborting its task and recomputing the capture rate — which may now decrease if this was the fastest watcher. Returns whether a watcher with that name was registered.
Trait Implementations§
Auto Trait Implementations§
impl Freeze 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