pub enum TaskClass {
Lossy,
Lossless,
}Expand description
Channel class of a TaskCommand under queue pressure.
The bounded queue (see DEFAULT_TASK_QUEUE_CAPACITY) rejects posts when
it is full. What the sender should do about that depends on the command:
TaskClass::Lossycommands are coalescent telemetry. Skipping one is harmless because the next sample supersedes it, so workers send them withUiProxy::postand drop onTaskSendError::Full.TaskClass::Losslesscommands are essential lifecycle tokens. Losing one strands the UI state machine (a task that never completes), so workers send them withUiProxy::send_lossless, which waits for room with backoff.
The class is a default, not a straitjacket: a widget mutation that
commits a transaction (for example the final result of a search) should
also travel through UiProxy::send_lossless even though its command
class is TaskClass::Lossy.
Variants§
Lossy
Coalescent telemetry: safe to drop under pressure.
Lossless
Essential lifecycle: must not be silently dropped.
Trait Implementations§
impl Copy for TaskClass
impl Eq for TaskClass
impl StructuralPartialEq for TaskClass
Auto Trait Implementations§
impl Forget for TaskClass
impl Freeze for TaskClass
impl Move for TaskClass
impl RefUnwindSafe for TaskClass
impl Send for TaskClass
impl Sync for TaskClass
impl Unpin for TaskClass
impl UnsafeUnpin for TaskClass
impl UnwindSafe for TaskClass
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