Skip to main content

ReadSpec

Struct ReadSpec 

Source
pub struct ReadSpec<'a> {
Show 17 fields pub views: Option<&'a str>, pub format: Option<&'a str>, pub words_per_page: Option<&'a str>, pub include: &'a [String], pub exclude: &'a [String], pub min_size: Option<&'a str>, pub modified_since: Option<&'a str>, pub modified_before: Option<&'a str>, pub kinds: Option<&'a str>, pub ignored: Option<&'a str>, pub depth: Option<&'a str>, pub min_share: Option<&'a str>, pub breadth: Option<&'a str>, pub limit: Option<&'a str>, pub sort: Option<&'a str>, pub reverse: bool, pub size: Option<&'a str>,
}
Expand description

What one read supplies, as its caller wrote it: the Query half of a request.

Split from the basis half rather than flattened beside it, because a holder of stored state fixes root, scope, and analyzers once and then answers many reads: a read names only this, and Request::read is what takes the two together. A field declared in both halves is a field one of them could silently drop, which is why this is the one declaration and RequestSpec contains it.

Fields§

§views: Option<&'a str>

Views: a comma list, or full.

§format: Option<&'a str>

Presentation format; omitted means automatic human output.

§words_per_page: Option<&'a str>

Logical words per document page: a positive integer.

§include: &'a [String]

Patterns an entry must match one of.

§exclude: &'a [String]

Patterns that exclude an entry.

§min_size: Option<&'a str>

Smallest size, as 512, 10M, or 1.5GiB.

§modified_since: Option<&'a str>

Inclusive lower bound on modification time, as 2h or a timestamp.

§modified_before: Option<&'a str>

Exclusive upper bound on modification time.

§kinds: Option<&'a str>

Entry kinds: a comma list of file, dir, symlink, or other.

§ignored: Option<&'a str>

Selection by ignored state: include, exclude, or only.

§depth: Option<&'a str>

Rendered tree depth: a whole number or all.

§min_share: Option<&'a str>

Minimum displayed contribution to the selected root, as a percentage.

§breadth: Option<&'a str>

Maximum immediate children shown per directory: a whole number or all.

§limit: Option<&'a str>

Rows per view: a whole number or all.

§sort: Option<&'a str>

Ordering key: size, count, mtime, or name.

§reverse: bool

Reverse the ordering.

§size: Option<&'a str>

Size metric: allocated or apparent.

Implementations§

Source§

impl ReadSpec<'_>

Source

pub const fn new() -> Self

A read that names nothing, so every axis takes its default.

Trait Implementations§

Source§

impl<'a> Clone for ReadSpec<'a>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Copy for ReadSpec<'a>

Source§

impl<'a> Debug for ReadSpec<'a>

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for ReadSpec<'_>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for ReadSpec<'a>

§

impl<'a> RefUnwindSafe for ReadSpec<'a>

§

impl<'a> Send for ReadSpec<'a>

§

impl<'a> Sync for ReadSpec<'a>

§

impl<'a> Unpin for ReadSpec<'a>

§

impl<'a> UnsafeUnpin for ReadSpec<'a>

§

impl<'a> UnwindSafe for ReadSpec<'a>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.