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.
pub fn as_str(&self) -> &str
Trait Implementations§
Source§impl AsRef<str> for TaskHandle
impl AsRef<str> for TaskHandle
Source§impl Clone for TaskHandle
impl Clone for TaskHandle
Source§fn clone(&self) -> TaskHandle
fn clone(&self) -> TaskHandle
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TaskHandle
impl Debug for TaskHandle
Source§impl<'de> Deserialize<'de> for TaskHandle
impl<'de> Deserialize<'de> for TaskHandle
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Source§impl Display for TaskHandle
impl Display for TaskHandle
impl Eq for TaskHandle
Source§impl FromStr for TaskHandle
impl FromStr for TaskHandle
Source§impl Hash for TaskHandle
impl Hash for TaskHandle
Source§impl Ord for TaskHandle
impl Ord for TaskHandle
Source§fn cmp(&self, other: &TaskHandle) -> Ordering
fn cmp(&self, other: &TaskHandle) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for TaskHandle
impl PartialEq for TaskHandle
Source§impl PartialOrd for TaskHandle
impl PartialOrd for TaskHandle
Source§impl Serialize for TaskHandle
impl Serialize for TaskHandle
impl StructuralPartialEq for TaskHandle
Auto Trait Implementations§
impl Freeze for TaskHandle
impl RefUnwindSafe for TaskHandle
impl Send for TaskHandle
impl Sync for TaskHandle
impl Unpin for TaskHandle
impl UnsafeUnpin for TaskHandle
impl UnwindSafe for TaskHandle
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.