pub struct TaskID(/* private fields */);Expand description
Unique identifier for a task in EdgeFirst Studio.
Tasks represent background operations such as training, validation, export, or dataset processing. Each task has a unique ID displayed in hexadecimal format with a “task-” prefix (e.g., “task-8e7d6c”).
§Relationship to BackgroundTaskID
The same underlying task is rendered with two different prefixes
depending on where you meet it. The JSON-RPC API exchanges task ids as
plain integers, and this type is how the client renders them. Studio
apps, their log URLs, and cloud-batch job names instead use the bt-
form, which is BackgroundTaskID. Both wrap the identical u64, so
converting between them is lossless and free – see the From impls
below.
§Examples
use edgefirst_client::{BackgroundTaskID, TaskID};
use std::str::FromStr;
let task_id = TaskID::from_str("task-abc123").unwrap();
assert_eq!(task_id.value(), 0xabc123);
// The same task, rendered the way a Studio app would see it.
let background: BackgroundTaskID = task_id.into();
assert_eq!(background.to_string(), "bt-abc123");
assert_eq!(background.value(), task_id.value());Implementations§
Trait Implementations§
impl Copy for TaskID
Source§impl<'de> Deserialize<'de> for TaskID
impl<'de> Deserialize<'de> for TaskID
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for TaskID
Source§impl From<BackgroundTaskID> for TaskID
impl From<BackgroundTaskID> for TaskID
Source§fn from(id: BackgroundTaskID) -> Self
fn from(id: BackgroundTaskID) -> Self
Converts to this type from the input type.
Source§impl From<TaskID> for BackgroundTaskID
impl From<TaskID> for BackgroundTaskID
impl StructuralPartialEq for TaskID
Auto Trait Implementations§
impl Freeze for TaskID
impl RefUnwindSafe for TaskID
impl Send for TaskID
impl Sync for TaskID
impl Unpin for TaskID
impl UnsafeUnpin for TaskID
impl UnwindSafe for TaskID
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
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,
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Key for Twhere
T: Clone,
impl<T> Key for Twhere
T: Clone,
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> Serialize for T
impl<T> Serialize for T
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>
fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more