pub struct ScanLimits { /* private fields */ }Expand description
Hard repository-scan resource limits.
Implementations§
Source§impl ScanLimits
impl ScanLimits
Sourcepub const fn new(
max_entries: u64,
max_source_bytes: u64,
max_workers: usize,
) -> Self
pub const fn new( max_entries: u64, max_source_bytes: u64, max_workers: usize, ) -> Self
Create explicit repository-scan limits.
Sourcepub const fn max_entries(self) -> u64
pub const fn max_entries(self) -> u64
Return the maximum repository entries considered.
Sourcepub const fn max_source_bytes(self) -> u64
pub const fn max_source_bytes(self) -> u64
Return the maximum cumulative source bytes hashed.
Sourcepub const fn max_workers(self) -> usize
pub const fn max_workers(self) -> usize
Return the requested maximum worker count.
Sourcepub fn effective_workers(self) -> usize
pub fn effective_workers(self) -> usize
Derive the worker count from the request, host availability, and safety cap.
Trait Implementations§
Source§impl Clone for ScanLimits
impl Clone for ScanLimits
Source§fn clone(&self) -> ScanLimits
fn clone(&self) -> ScanLimits
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ScanLimits
impl Debug for ScanLimits
Source§impl Default for ScanLimits
impl Default for ScanLimits
Source§impl PartialEq for ScanLimits
impl PartialEq for ScanLimits
impl Copy for ScanLimits
impl Eq for ScanLimits
impl StructuralPartialEq for ScanLimits
Auto Trait Implementations§
impl Freeze for ScanLimits
impl RefUnwindSafe for ScanLimits
impl Send for ScanLimits
impl Sync for ScanLimits
impl Unpin for ScanLimits
impl UnwindSafe for ScanLimits
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.