pub enum FileType {
Image,
LidarPcd,
LidarDepth,
LidarReflect,
RadarPcd,
RadarCube,
All,
}Expand description
File types supported in EdgeFirst Studio datasets.
Represents the different types of sensor data files that can be stored and processed in a dataset. EdgeFirst Studio supports various modalities including visual images and different forms of LiDAR and radar data.
§String Representations
This enum has two string representations:
- Display (
fmt::Display): Returns the server API type name (e.g.,"lidar.depth") used when making API requests to EdgeFirst Studio. - file_extension(): Returns the file extension for saving (e.g.,
"lidar.png") which may differ from the API type name.
§Examples
use edgefirst_client::FileType;
// Create file types from strings
let image_type: FileType = "image".try_into().unwrap();
let lidar_type: FileType = "lidar.pcd".try_into().unwrap();
// Display file types
println!("Processing {} files", image_type); // "Processing image files"
// Use in dataset operations - example usage
let file_type = FileType::Image;
match file_type {
FileType::Image => println!("Processing image files"),
FileType::LidarPcd => println!("Processing LiDAR point cloud files"),
_ => println!("Processing other sensor data"),
}Variants§
Image
Standard image files (JPEG, PNG, etc.)
LidarPcd
LiDAR point cloud data files (.pcd format)
LidarDepth
LiDAR depth images (.png format)
LidarReflect
LiDAR reflectance images (.jpg format)
RadarPcd
Radar point cloud data files (.pcd format)
RadarCube
Radar cube data files (.png format)
All
All sensor types - expands to all known file types
Implementations§
Source§impl FileType
impl FileType
Sourcepub fn file_extension(&self) -> &'static str
pub fn file_extension(&self) -> &'static str
Returns the file extension to use when saving downloaded files. This may differ from the API type name (e.g., lidar.depth → lidar.png).
Source§impl FileType
impl FileType
Sourcepub fn all_sensor_types() -> Vec<FileType>
pub fn all_sensor_types() -> Vec<FileType>
Returns all concrete sensor file types (excludes All).
This is useful for expanding the All variant or listing available
types.
§Example
use edgefirst_client::FileType;
let all_types = FileType::all_sensor_types();
assert!(all_types.contains(&FileType::Image));
assert!(!all_types.contains(&FileType::All));Sourcepub fn type_names() -> Vec<&'static str>
pub fn type_names() -> Vec<&'static str>
Returns all valid type names as strings for help text.
§Example
use edgefirst_client::FileType;
let names = FileType::type_names();
assert!(names.contains(&"image"));
assert!(names.contains(&"all"));Sourcepub fn expand_types(types: &[FileType]) -> Vec<FileType>
pub fn expand_types(types: &[FileType]) -> Vec<FileType>
Expands a list of file types, replacing All with all concrete sensor
types.
If the input contains FileType::All, returns all sensor types.
Otherwise, returns the input types unchanged.
§Example
use edgefirst_client::FileType;
let types = vec![FileType::All];
let expanded = FileType::expand_types(&types);
assert_eq!(expanded.len(), 6); // All concrete sensor types
let types = vec![FileType::Image, FileType::LidarPcd];
let expanded = FileType::expand_types(&types);
assert_eq!(expanded.len(), 2); // UnchangedTrait Implementations§
impl Eq for FileType
impl StructuralPartialEq for FileType
Auto Trait Implementations§
impl Freeze for FileType
impl RefUnwindSafe for FileType
impl Send for FileType
impl Sync for FileType
impl Unpin for FileType
impl UnsafeUnpin for FileType
impl UnwindSafe for FileType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.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> ⓘ
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> 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> 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 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.