pub struct Options {
pub enabled: bool,
pub mode: Mode,
pub explain: bool,
pub max_entries: Option<usize>,
}Expand description
Everything the store needs from outside itself.
Built once, by the caller that is already reading flags and the environment, and passed
in. Nothing in this module reaches for std::env: a run’s behaviour is decided in one
place, so reading that place tells you what the run will do.
Fields§
§enabled: bool--no-cache turns this off. Separate from how the cache is grained.
mode: ModeHow much of a run one entry covers. Held here rather than decided per lookup, so the whole run reads and writes the same grain.
explain: boolSay why lookups missed, and what the run did with the store.
max_entries: Option<usize>Entries a project’s store may hold. None scales it to the project size.
Implementations§
Source§impl Options
The switches every reader of the store honours, from the environment:
HTL_NO_CACHE (neither read nor write), HTL_CACHE_DEBUG (say why lookups missed),
HTL_CACHE_MAX_ENTRIES (the sweep’s bound; the test suite’s, since nothing else can
reach a few hundred entries by honest means). A command’s flags override what this
read; the proc macros have no flags and take this as it is.
impl Options
The switches every reader of the store honours, from the environment:
HTL_NO_CACHE (neither read nor write), HTL_CACHE_DEBUG (say why lookups missed),
HTL_CACHE_MAX_ENTRIES (the sweep’s bound; the test suite’s, since nothing else can
reach a few hundred entries by honest means). A command’s flags override what this
read; the proc macros have no flags and take this as it is.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Options
impl RefUnwindSafe for Options
impl Send for Options
impl Sync for Options
impl Unpin for Options
impl UnsafeUnpin for Options
impl UnwindSafe for Options
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<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 more