pub enum FileFormat {
Show 27 variants
Parquet,
Csv,
Tsv,
Psv,
Json,
Jsonl,
Arrow,
Avro,
Orc,
Excel,
Safetensors,
Gguf,
Nmea,
Gpx,
Audio,
Midi,
Sqlite,
Vcd,
Fix,
Sdf,
Numpy,
Elf,
Ulog,
Dataflash,
Candump,
Text,
Journal,
}Expand description
A format datui reads, as --format names it.
Variants§
Parquet
Csv
Tsv
Psv
Json
Jsonl
Arrow
Avro
Orc
Excel
Safetensors
Gguf
Nmea
Gpx
Audio
Midi
Sqlite
Vcd
Fix
Sdf
Numpy
Elf
Ulog
Dataflash
Candump
Text
Journal
Implementations§
Source§impl FileFormat
impl FileFormat
Sourcepub const ALL: [FileFormat; 27]
pub const ALL: [FileFormat; 27]
Every format, for the places that have to consider all of them, in the order
--format’s help lists them.
Written out, and so able to fall behind the enum. every_format_is_listed
matches a variant exhaustively, so adding one stops that test compiling. What a
format missing here would cost is bounded: from_name answers None for it,
and every caller reads None as “not Parquet”, which leaves counts off a
directory rather than giving it another format’s.
Sourcepub const TEXT: FileFormat = Self::Text
pub const TEXT: FileFormat = Self::Text
What text with nothing else to say is read as: a pipe, a followed file, a compressed file whose format is not named, when nothing in it says more.
Sourcepub const fn descriptor(self) -> &'static Descriptor
pub const fn descriptor(self) -> &'static Descriptor
The format’s descriptor.
Sourcepub fn from_path(path: &Path) -> Option<FileFormat>
pub fn from_path(path: &Path) -> Option<FileFormat>
The format path’s name says: a name ending a descriptor lists
(model.safetensors.index.json) first, then its extension. None for a name that
says none.
Sourcepub fn from_name_ending(path: &Path) -> Option<FileFormat>
pub fn from_name_ending(path: &Path) -> Option<FileFormat>
The format a whole-name ending says (model.safetensors.index.json), before
the extension does.
Sourcepub fn name(self) -> &'static str
pub fn name(self) -> &'static str
The format’s name, as a row on the home screen says it: 12 parquet, 3 csv.
The dataset cache stores it (Holds), so renaming one makes the records already
on disk unreadable.
Sourcepub fn from_name(name: &str) -> Option<FileFormat>
pub fn from_name(name: &str) -> Option<FileFormat>
The format a FileFormat::name names, for a name that was stored rather than
carried. The inverse of that method, and the only way back: a name is not an
extension, so from_extension cannot read one.
Sourcepub fn reads_many_files(self) -> bool
pub fn reads_many_files(self) -> bool
Whether many files of this format can be read as one table.
Asked before a directory is offered as a dataset, so the home screen cannot promise an open the reader has no route for.
Sourcepub fn holds_tables(self) -> bool
pub fn holds_tables(self) -> bool
Whether a file of this format can hold several tables, each with a path inside
it (shop.db/orders, run.npz/weights) that the home screen lists like a
directory’s files and --table names.
Sourcepub fn opens_one_table(self) -> bool
pub fn opens_one_table(self) -> bool
Whether a file of this format holding several tables opens one when none is
named. See Tables::opens.
Sourcepub fn summary_tab(self) -> Option<&'static str>
pub fn summary_tab(self) -> Option<&'static str>
The name of the format’s tab of the Info panel, when it has one.
Sourcepub fn takes_table(self) -> bool
pub fn takes_table(self) -> bool
Whether --table picks one of the tables of a file of this format.
Sourcepub fn reads_into(self) -> bool
pub fn reads_into(self) -> bool
Whether a file of this format is read into files of its own before it is scanned: a GPS log, VCD dump, FIX log or SDF file.
Sourcepub fn read_mode(self, stored: Stored) -> Option<ReadMode>
pub fn read_mode(self, stored: Stored) -> Option<ReadMode>
How a file of this format is read when it is opened, as stored on disk.
The one answer to “does this read only what it shows”: the format table in
docs/formats/index.md, the home screen’s marker and the Info panel’s Read:
line all ask here. None when a file stored that way does not open: a compressed
Parquet file, or an IPC stream of anything but Arrow.
Sourcepub fn bucket_object(self, stored: Stored) -> RemoteRead
pub fn bucket_object(self, stored: Stored) -> RemoteRead
How one object of this format in a bucket (S3, GCS, Azure), as stored, is
read: in place with ranged reads, or downloaded first and then read as
Self::read_mode says. Only a plain file is read in place.
Sourcepub fn http_file(self) -> RemoteRead
pub fn http_file(self) -> RemoteRead
How one HTTP(S) file of this format is read. A server that sends no ranges gets the download question.
Sourcepub fn bucket_prefix(self, stored: Stored) -> Option<RemoteRead>
pub fn bucket_prefix(self, stored: Stored) -> Option<RemoteRead>
How a bucket prefix or glob of files of this format, as stored, is read as
one table: in place, downloaded first, or None when it is not (browsed into
and opened an object at a time). A prefix of streams is converted as it
downloads.
Sourcepub fn reads_bucket_prefix(self) -> bool
pub fn reads_bucket_prefix(self) -> bool
Whether a bucket prefix or glob of this format is scanned in place as one table.
See Self::bucket_prefix.
Sourcepub fn separator(self) -> Option<u8>
pub fn separator(self) -> Option<u8>
The column separator a delimited format is read with when --delimiter is not
given. None for the formats that are not delimited text.
Sourcepub fn follows(self) -> bool
pub fn follows(self) -> bool
Whether --follow reads a file of this format as it grows: text read a line
at a time.
Sourcepub fn is_lines(self) -> bool
pub fn is_lines(self) -> bool
Whether a file of this format is read a line a row, as it stands.
Sourcepub fn decompressed_once(self) -> bool
pub fn decompressed_once(self) -> bool
Whether a compressed file of this format is decompressed once, to a file or into memory, before it is read: delimited text and lines.
Sourcepub fn conversion(self) -> Conversion
pub fn conversion(self) -> Conversion
What the open says while a file of this format is read into files of its own. A format with nothing of its own to say says it converts.
Sourcepub fn from_extension(ext: &str) -> Option<FileFormat>
pub fn from_extension(ext: &str) -> Option<FileFormat>
The format an extension says (parquet, csv).
The one place an extension becomes a format. Everything that asks whether a name
is data — the home screen, the search, ~ path input, the CLI and the cloud
listings — asks here, so no route can offer a file another route cannot open.
.txt and .log say text, read a line a row. A directory ranks text below
every other format, so a README beside Parquet files does not decide what the
directory is. A tabular .txt opens with --format csv.
Trait Implementations§
Source§impl Clone for FileFormat
impl Clone for FileFormat
Source§fn clone(&self) -> FileFormat
fn clone(&self) -> FileFormat
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for FileFormat
Source§impl Debug for FileFormat
impl Debug for FileFormat
impl Eq for FileFormat
Source§impl Hash for FileFormat
impl Hash for FileFormat
Source§impl PartialEq for FileFormat
impl PartialEq for FileFormat
impl StructuralPartialEq for FileFormat
Auto Trait Implementations§
impl Freeze for FileFormat
impl RefUnwindSafe for FileFormat
impl Send for FileFormat
impl Sync for FileFormat
impl Unpin for FileFormat
impl UnsafeUnpin for FileFormat
impl UnwindSafe for FileFormat
Blanket Implementations§
impl<T> Allocation for T
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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<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<D> OwoColorize for D
impl<D> OwoColorize for D
Source§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
Source§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
Source§fn black(&self) -> FgColorDisplay<'_, Black, Self>
fn black(&self) -> FgColorDisplay<'_, Black, Self>
Source§fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
Source§fn red(&self) -> FgColorDisplay<'_, Red, Self>
fn red(&self) -> FgColorDisplay<'_, Red, Self>
Source§fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
Source§fn green(&self) -> FgColorDisplay<'_, Green, Self>
fn green(&self) -> FgColorDisplay<'_, Green, Self>
Source§fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
Source§fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
Source§fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
Source§fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
Source§fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
Source§fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
Source§fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
Source§fn white(&self) -> FgColorDisplay<'_, White, Self>
fn white(&self) -> FgColorDisplay<'_, White, Self>
Source§fn on_white(&self) -> BgColorDisplay<'_, White, Self>
fn on_white(&self) -> BgColorDisplay<'_, White, Self>
Source§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
Source§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
Source§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
Source§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
Source§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
Source§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
Source§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
Source§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
Source§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
Source§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
Source§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
Source§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
Source§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
Source§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
Source§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
Source§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
Source§fn bold(&self) -> BoldDisplay<'_, Self>
fn bold(&self) -> BoldDisplay<'_, Self>
Source§fn dimmed(&self) -> DimDisplay<'_, Self>
fn dimmed(&self) -> DimDisplay<'_, Self>
Source§fn italic(&self) -> ItalicDisplay<'_, Self>
fn italic(&self) -> ItalicDisplay<'_, Self>
Source§fn underline(&self) -> UnderlineDisplay<'_, Self>
fn underline(&self) -> UnderlineDisplay<'_, Self>
Source§fn blink(&self) -> BlinkDisplay<'_, Self>
fn blink(&self) -> BlinkDisplay<'_, Self>
Source§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
Source§fn reversed(&self) -> ReversedDisplay<'_, Self>
fn reversed(&self) -> ReversedDisplay<'_, Self>
Source§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
Source§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg or
a color-specific method, such as OwoColorize::green, Read moreSource§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg or
a color-specific method, such as OwoColorize::on_yellow, Read more