Skip to main content

ScanBackendDiagnostics

Struct ScanBackendDiagnostics 

Source
#[non_exhaustive]
pub struct ScanBackendDiagnostics { pub portable_attempts: u64, pub portable_directory_reads: u64, pub macos_bulk_attempts: Option<u64>, pub macos_bulk_successes: Option<u64>, pub macos_bulk_fallbacks: Option<u64>, pub unavailable_reason: Option<&'static str>, pub linux_dents_attempts: Option<u64>, pub linux_dents_successes: Option<u64>, pub linux_dents_fallbacks: Option<u64>, }
Expand description

Directory enumeration backends used by one scan.

Each native reader’s listings are counted in its own fields, and a directory it declines is counted as its fallback and then as a portable attempt. On Linux, for the native reader (getdents64 and statx, glibc builds):

  • linux_dents_attempts = linux_dents_successes + linux_dents_fallbacks;
  • the report’s dirs_read = linux_dents_successes + portable_directory_reads.

unavailable_reason describes only the macOS fields.

Non-exhaustive, as crate::counters::Counts is: a diagnostics record grows with the backends it describes, so a later field is an additive change. Code outside the engine reads its fields; only the engine builds one.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§portable_attempts: u64

Portable read_dir calls attempted.

§portable_directory_reads: u64

Portable directory listings completed successfully.

§macos_bulk_attempts: Option<u64>

macOS bulk enumeration attempts, or null off macOS.

§macos_bulk_successes: Option<u64>

Successful macOS bulk listings, or null off macOS.

§macos_bulk_fallbacks: Option<u64>

Bulk attempts that fell back to portable enumeration, or null off macOS.

§unavailable_reason: Option<&'static str>

Why macOS fields are null.

§linux_dents_attempts: Option<u64>

Linux native getdents64 listing attempts, or null off Linux (and on a Linux build without glibc, where the native reader is not compiled).

§linux_dents_successes: Option<u64>

Successful Linux native listings, or null off Linux.

§linux_dents_fallbacks: Option<u64>

Linux native attempts that fell back to portable enumeration, or null off Linux.

Trait Implementations§

Source§

impl Clone for ScanBackendDiagnostics

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 Debug for ScanBackendDiagnostics

Source§

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

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

impl Eq for ScanBackendDiagnostics

Source§

impl PartialEq for ScanBackendDiagnostics

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ScanBackendDiagnostics

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> 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.