pub struct FakeSource { /* private fields */ }Expand description
A fake source for --fake mode and tests, backed by a watch channel so it
can stream like the real one. FakeSource::idle is static; FakeSource::ramping
simulates a running print (temps climb toward target, progress advances) so
the live charts have moving data to draw.
Implementations§
Source§impl FakeSource
impl FakeSource
Sourcepub fn ramping(interval: Duration) -> Self
pub fn ramping(interval: Duration) -> Self
A printer simulating a 2-colour print: nozzle/bed temps ramp toward
target, fans spin up, progress advances one layer per interval, and a
loaded AMS (4 trays) is reported — enough to exercise every dashboard
card. Runs to 100% then reports FINISH. Spawns a task on the current
tokio runtime.
Trait Implementations§
Source§impl PrinterSource for FakeSource
impl PrinterSource for FakeSource
Source§fn current(&self) -> PrinterStatus
fn current(&self) -> PrinterStatus
The latest known status.
Source§fn subscribe(&self) -> Receiver<PrinterStatus>
fn subscribe(&self) -> Receiver<PrinterStatus>
Subscribe to status updates. The receiver’s current value is whatever
the source last held; callers should send it first (via
borrow_and_update)
and then await changed() for each subsequent update.Auto Trait Implementations§
impl Freeze for FakeSource
impl RefUnwindSafe for FakeSource
impl Send for FakeSource
impl Sync for FakeSource
impl Unpin for FakeSource
impl UnsafeUnpin for FakeSource
impl UnwindSafe for FakeSource
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