pub enum FormatChoice {
Builtin(FileFormat),
Spec(String),
File(PathBuf),
}Expand description
What --format names: a format datui reads, a format spec on the search path, or
a spec’s file.
Variants§
Builtin(FileFormat)
Spec(String)
A spec on the search path, by its namespaced name.
File(PathBuf)
A spec’s file: ./acme.toml.
Implementations§
Source§impl FormatChoice
impl FormatChoice
Sourcepub fn builtin(&self) -> Option<FileFormat>
pub fn builtin(&self) -> Option<FileFormat>
The built-in format, when that is what was named.
Sourcepub fn read_mode(&self, stored: Stored) -> Option<ReadMode>
pub fn read_mode(&self, stored: Stored) -> Option<ReadMode>
How a file read this way is read when opened: a built-in format’s
FileFormat::read_mode, or a spec’s, whose records are decoded from a map of
the file (or of its decompressed copy) only where they are shown.
Sourcepub fn bucket_object(&self, stored: Stored) -> RemoteRead
pub fn bucket_object(&self, stored: Stored) -> RemoteRead
How one object read this way in a bucket is read. A spec reads local files, so a spec’s object is downloaded first.
Sourcepub fn http_file(&self) -> RemoteRead
pub fn http_file(&self) -> RemoteRead
How one HTTP(S) file read this way is read; a spec’s is downloaded first.
Sourcepub fn bucket_prefix(&self, stored: Stored) -> Option<RemoteRead>
pub fn bucket_prefix(&self, stored: Stored) -> Option<RemoteRead>
How a bucket prefix read this way is read as one table; a spec’s is not.
Trait Implementations§
Source§impl Clone for FormatChoice
impl Clone for FormatChoice
Source§impl Debug for FormatChoice
impl Debug for FormatChoice
impl Eq for FormatChoice
Source§impl PartialEq for FormatChoice
impl PartialEq for FormatChoice
impl StructuralPartialEq for FormatChoice
Auto Trait Implementations§
impl Freeze for FormatChoice
impl RefUnwindSafe for FormatChoice
impl Send for FormatChoice
impl Sync for FormatChoice
impl Unpin for FormatChoice
impl UnsafeUnpin for FormatChoice
impl UnwindSafe for FormatChoice
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