pub struct SourceTreeLimits { /* private fields */ }Expand description
The common module records and containers. These explicit facade exports keep ordinary callers out of the component crate paths. Explicit admission limits for an in-memory tree or one selected view.
These limits do not read environment variables. They bound admitted files, their combined byte length, and path depth relative to the selected root. View limits apply to exposed files; a view keeps the shared tree owner alive, whose total storage is bounded by the limits used to construct the tree. Parser work and decoded model allocations have their own limits. Defaults are 4096 files, 1 GiB, and 64 path segments.
Implementations§
Source§impl SourceTreeLimits
impl SourceTreeLimits
Sourcepub fn new(
files: usize,
bytes: u64,
depth: usize,
) -> Result<SourceTreeLimits, Error>
pub fn new( files: usize, bytes: u64, depth: usize, ) -> Result<SourceTreeLimits, Error>
Set positive file, byte, and depth limits. Depth cannot exceed the source resolver’s 64-segment bound; bytes must fit this platform.
pub const fn max_files(self) -> usize
pub const fn max_bytes(self) -> u64
pub const fn max_depth(self) -> usize
Trait Implementations§
Source§impl Clone for SourceTreeLimits
impl Clone for SourceTreeLimits
Source§fn clone(&self) -> SourceTreeLimits
fn clone(&self) -> SourceTreeLimits
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SourceTreeLimits
Source§impl Debug for SourceTreeLimits
impl Debug for SourceTreeLimits
Source§impl Default for SourceTreeLimits
impl Default for SourceTreeLimits
Source§fn default() -> SourceTreeLimits
fn default() -> SourceTreeLimits
Returns the “default value” for a type. Read more
impl Eq for SourceTreeLimits
Source§impl PartialEq for SourceTreeLimits
impl PartialEq for SourceTreeLimits
impl StructuralPartialEq for SourceTreeLimits
Auto Trait Implementations§
impl Freeze for SourceTreeLimits
impl RefUnwindSafe for SourceTreeLimits
impl Send for SourceTreeLimits
impl Sync for SourceTreeLimits
impl Unpin for SourceTreeLimits
impl UnsafeUnpin for SourceTreeLimits
impl UnwindSafe for SourceTreeLimits
Blanket Implementations§
impl<T> Allocation for T
impl<T> Boilerplate for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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
Checks if this value is equivalent to the given key. Read more
§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.