pub struct PrintActivitySession { /* private fields */ }Expand description
Tracks only a print’s lifecycle (active → ended), no layer logic — for a
runner that samples frames on its own clock (a wall-time interval) rather than
per layer. Shares the active/stop rules with CaptureSession so both agree
on when a print starts and ends.
Implementations§
Source§impl PrintActivitySession
impl PrintActivitySession
Sourcepub fn new(wait: bool) -> Self
pub fn new(wait: bool) -> Self
wait = sit through idle/finished until a print becomes active (so the
runner can be armed before the print starts), rather than stopping at once.
Sourcepub fn observe(&mut self, s: &PrinterStatus) -> ActivityAction
pub fn observe(&mut self, s: &PrinterStatus) -> ActivityAction
Feed the current status (call on each sampling tick). Stop takes priority
over Capture so a finishing print ends cleanly instead of grabbing once
more.
Auto Trait Implementations§
impl Freeze for PrintActivitySession
impl RefUnwindSafe for PrintActivitySession
impl Send for PrintActivitySession
impl Sync for PrintActivitySession
impl Unpin for PrintActivitySession
impl UnsafeUnpin for PrintActivitySession
impl UnwindSafe for PrintActivitySession
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