1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
// Project: hyperi-rustlib
// File: src/concurrency/error.rs
// Purpose: Error types for the three async concurrency primitives
// Language: Rust
//
// License: FSL-1.1-ALv2
// Copyright: (c) 2026 HYPERI PTY LIMITED
//! Error types for [`crate::concurrency`] primitives.
//!
//! Three concrete error enums, one per primitive:
//! [`SinkError`] for `BackgroundSink`, [`TickError`] for `PeriodicWorker`,
//! [`ActorError`] for `ActorHandle`. Plus [`DrainError`] for `SinkDrain`
//! implementations to report backend failures back to the actor.
use Error as StdError;
use Error;
/// Errors returned by [`super::BackgroundSink`] push / flush operations.
/// Errors returned by [`super::SinkDrain`] implementations.
///
/// Drain failures are logged + counted but do NOT terminate the actor.
/// The actor continues draining subsequent batches. If a drain
/// consistently fails, operators see rising `<prefix>_write_errors_total`
/// and the `<prefix>_pending` gauge climbing toward the queue cap.
/// Errors returned by [`super::PeriodicTask`] tick implementations.
///
/// Tick errors are logged at WARN and do NOT terminate the worker —
/// the next tick still fires. Consumers wanting fail-fast must return
/// `Ok(())` from `tick` and surface their failure differently (e.g.
/// via a `failed: AtomicBool` flag the parent process polls).
/// Errors returned by [`super::ActorHandle`] send operations.