pub struct AnnotationSet { /* private fields */ }Expand description
The AnnotationSet class represents a collection of annotations in a dataset. A dataset can have multiple annotation sets, each containing annotations for different tasks or purposes.
When fetched with a version tag, the server returns a reduced snapshot
shape that omits dataset_id and the creation date — AnnotationSet::dataset_id is
backfilled by the client from the query context in that case, and
AnnotationSet::created returns None.
Implementations§
Source§impl AnnotationSet
impl AnnotationSet
pub fn id(&self) -> AnnotationSetID
Sourcepub fn dataset_id(&self) -> Option<DatasetID>
pub fn dataset_id(&self) -> Option<DatasetID>
Returns the dataset ID this annotation set belongs to. When this
value was fetched via a tag-scoped query, the server does not
return dataset_id on the wire; the client backfills it from the
dataset_id argument the query was made with.
pub fn name(&self) -> &str
pub fn description(&self) -> &str
Sourcepub fn created(&self) -> Option<DateTime<Utc>>
pub fn created(&self) -> Option<DateTime<Utc>>
Returns the creation date, or None if this annotation set was
fetched via a tag-scoped query (the server’s tag snapshot does not
retain a creation timestamp).
pub async fn dataset(&self, client: &Client) -> Result<Dataset, Error>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AnnotationSet
impl<'de> Deserialize<'de> for AnnotationSet
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>,
Auto Trait Implementations§
impl Freeze for AnnotationSet
impl RefUnwindSafe for AnnotationSet
impl Send for AnnotationSet
impl Sync for AnnotationSet
impl Unpin for AnnotationSet
impl UnsafeUnpin for AnnotationSet
impl UnwindSafe for AnnotationSet
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
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> ⓘ
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> ⓘ
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> 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> 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>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more