pub struct TaskHandle(/* private fields */);Expand description
A durable task’s handle: <16 lowercase hex>/<32 lowercase hex>.
Never becomes a filesystem path outside the data directory root — every
place one is turned into a path validates the grammar first
(DataDir::agent_dir) — and is stable for the task’s whole life: spawn
mints it once, and every other verb takes it back unchanged.
Implementations§
Source§impl TaskHandle
impl TaskHandle
Sourcepub fn parse(handle: impl Into<String>) -> Result<Self, Error>
pub fn parse(handle: impl Into<String>) -> Result<Self, Error>
Parses a handle, refusing anything that does not fit the grammar.
The refusal is deliberately generic — “not a task handle” rather than
a byte-by-byte diagnosis — because the grammar is opaque by design:
there is nothing more specific a caller should learn about why a
string is not one. The error carries Error::invalid_reference: a
malformed handle was never going to resolve, whatever else settles —
the same fact this crate reports for a handle from another
workspace.