pub struct CaptureSession { /* private fields */ }Expand description
Per-print capture state. One session captures one print: it watches for the
print to be active (optionally waiting for it),
emits a CaptureAction::Capture on each new layer that passes the every
filter, and Stops when the print reaches a terminal
state or errors.
Implementations§
Source§impl CaptureSession
impl CaptureSession
Sourcepub fn new(every: u64, wait: bool) -> Self
pub fn new(every: u64, wait: bool) -> Self
every = capture every Nth layer (clamped to >= 1). wait = sit through
idle/finished/stale-error states until a print becomes active (so the
session can be started before the print), rather than stopping at once.
Sourcepub fn observe(&mut self, s: &PrinterStatus) -> CaptureAction
pub fn observe(&mut self, s: &PrinterStatus) -> CaptureAction
Feed one status snapshot; get the action to take.
Auto Trait Implementations§
impl Freeze for CaptureSession
impl RefUnwindSafe for CaptureSession
impl Send for CaptureSession
impl Sync for CaptureSession
impl Unpin for CaptureSession
impl UnsafeUnpin for CaptureSession
impl UnwindSafe 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