pub struct Sample {Show 16 fields
pub id: Option<SampleID>,
pub group: Option<String>,
pub sequence_name: Option<String>,
pub sequence_uuid: Option<String>,
pub sequence_description: Option<String>,
pub frame_number: Option<u32>,
pub uuid: Option<String>,
pub image_name: Option<String>,
pub image_url: Option<String>,
pub width: Option<u32>,
pub height: Option<u32>,
pub date: Option<DateTime<Utc>>,
pub source: Option<String>,
pub location: Option<Location>,
pub files: Vec<SampleFile>,
pub annotations: Vec<Annotation>,
}Expand description
A sample in a dataset, typically representing a single image with metadata and optional sensor data.
Each sample has a unique ID, image reference, and can include additional sensor data like LiDAR, radar, or depth maps. Samples can also have associated annotations.
Fields§
§id: Option<SampleID>§group: Option<String>§sequence_name: Option<String>§sequence_uuid: Option<String>§sequence_description: Option<String>§frame_number: Option<u32>§uuid: Option<String>§image_name: Option<String>§image_url: Option<String>§width: Option<u32>§height: Option<u32>§date: Option<DateTime<Utc>>§source: Option<String>§location: Option<Location>Camera location and pose (GPS + IMU data). Serialized as “sensors” for API compatibility with populate endpoint.
files: Vec<SampleFile>Additional sensor files (LiDAR, radar, depth maps, etc.).
When deserializing from samples.list: Vec
annotations: Vec<Annotation>Implementations§
Source§impl Sample
impl Sample
pub fn id(&self) -> Option<SampleID>
pub fn uid(&self) -> Option<String>
pub fn name(&self) -> Option<String>
pub fn group(&self) -> Option<&String>
pub fn sequence_name(&self) -> Option<&String>
pub fn sequence_uuid(&self) -> Option<&String>
pub fn sequence_description(&self) -> Option<&String>
pub fn frame_number(&self) -> Option<u32>
pub fn uuid(&self) -> Option<&String>
pub fn image_name(&self) -> Option<&str>
pub fn image_url(&self) -> Option<&str>
pub fn width(&self) -> Option<u32>
pub fn height(&self) -> Option<u32>
pub fn date(&self) -> Option<DateTime<Utc>>
pub fn source(&self) -> Option<&String>
pub fn location(&self) -> Option<&Location>
pub fn files(&self) -> &[SampleFile]
pub fn annotations(&self) -> &[Annotation]
pub fn with_annotations(self, annotations: Vec<Annotation>) -> Self
pub async fn download( &self, client: &Client, file_type: FileType, ) -> Result<Option<Vec<u8>>, Error>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Sample
impl<'de> Deserialize<'de> for Sample
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
Auto Trait Implementations§
impl Freeze for Sample
impl RefUnwindSafe for Sample
impl Send for Sample
impl Sync for Sample
impl Unpin for Sample
impl UnwindSafe for Sample
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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,
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 moreSource§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.