#[non_exhaustive]pub struct Usage {
pub total_bytes: usize,
pub item_bytes: usize,
pub fact_bytes: usize,
pub glob_bytes: usize,
pub max_file_tokens: usize,
pub max_recursion: usize,
pub max_directory_depth: usize,
pub work: usize,
}Expand description
What a load spent against its budgets, as Workspace::usage reports it.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.total_bytes: usizeBytes read: every source file and manifest (Budget::TotalBytes).
item_bytes: usizeBytes charged to the index, shared immutable derived glob facts and
native load traversal scratch
(Budget::ItemBytes).
fact_bytes: usizeBytes charged to the facts of the files (Budget::FactBytes).
glob_bytes: usizeThe most bytes charged to import settling at once
(Budget::GlobBytes): scope tables, retained named and glob reads,
queues, subscriptions, graph scratch, impl self-type and trait-path
traversal scratch, derived glob-fact construction scratch and waiting
changes at their peak. Immutable cached glob facts use item_bytes.
max_file_tokens: usizeThe most tokens of one file (Budget::FileTokens).
max_recursion: usizeThe highest value the recursion counter of the pre-scan reached in one
file (Budget::Recursion).
max_directory_depth: usizeThe deepest directory that discovery or a workspace.members pattern
entered, in levels below its root (Budget::DirectoryDepth).
work: usizeThe import-settling steps the load made (Budget::Work), including
table reconstruction, retained reads, queues, subscriptions and graph
traversal, plus impl self-type and trait-path traversal and its retained
path segments and bytes. Named imports consume this budget even without glob imports.
Trait Implementations§
impl Copy for Usage
impl Eq for Usage
impl StructuralPartialEq for Usage
Auto Trait Implementations§
impl Forget for Usage
impl Freeze for Usage
impl Move for Usage
impl RefUnwindSafe for Usage
impl Send for Usage
impl Sync for Usage
impl Unpin for Usage
impl UnsafeUnpin for Usage
impl UnwindSafe for Usage
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<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
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.impl<T> EvidenceLease for T
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