Skip to main content

Descriptor

Struct Descriptor 

Source
pub struct Descriptor {
Show 16 fields pub name: &'static str, pub title: &'static str, pub extensions: &'static [&'static str], pub name_endings: &'static [&'static str], pub read: ReadMode, pub compressed: Compressed, pub stream: Option<ReadMode>, pub http: RemoteRead, pub bucket_object: RemoteRead, pub bucket_prefix: Option<RemoteRead>, pub many_files: bool, pub lines: Option<Lines>, pub tables: Option<Tables>, pub summary: Summary, pub declares_types: bool, pub conversion: Option<Conversion>,
}
Expand description

What datui knows of a format without reading a file of it.

Fields§

§name: &'static str

The name --format takes and the home screen counts (12 parquet). Lowercase and singular, one per format rather than per extension.

§title: &'static str

What the format is called in a sentence: SQLite, Arrow IPC.

§extensions: &'static [&'static str]

The extensions that say it, lowercase and without the dot. The first is the one a glob over a directory of it names.

§name_endings: &'static [&'static str]

Whole-name endings that say it before the extension does: model.safetensors.index.json is SafeTensors, read as the shards it names.

§read: ReadMode

How a file of it on disk, as its extension says, is read.

§compressed: Compressed

How a compressed file of it is read.

§stream: Option<ReadMode>

How an Arrow IPC stream of it is read, for the one format that has streams.

§http: RemoteRead

How one HTTP(S) file of it is read.

§bucket_object: RemoteRead

How one object of it in a bucket is read.

§bucket_prefix: Option<RemoteRead>

How a bucket prefix or glob of it is read as one table, or None when it is browsed into and opened an object at a time.

§many_files: bool

Whether many files of it are read as one table.

§lines: Option<Lines>

How a line of it is read, for text read a line at a time: what --follow reads as it grows.

§tables: Option<Tables>

The tables a file of it can hold, and how one is picked. The home screen lists them as places inside the file (shop.db/orders, run.npz/weights) that recents record and --table names.

§summary: Summary

What the Info panel shows of a file of it besides the Schema tab.

§declares_types: bool

Whether a file of it declares its columns’ types, which the Schema tab then calls known rather than inferred.

§conversion: Option<Conversion>

What the loading screen and the footer say while a file of it is read into files of its own before it is scanned.

Trait Implementations§

Source§

impl Debug for Descriptor

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.