pub struct ResourceLimits {
pub max_read_bytes: usize,
pub stream_chunk_bytes: usize,
pub max_directory_entries: usize,
pub max_directory_path_bytes: usize,
pub max_walk_depth: usize,
}Expand description
Default resource policy for a client. Per-call options override it. Byte limits bound logical payload, not allocator capacity or RPC overhead.
Fields§
§max_read_bytes: usizeMaximum collected scalar payload or aggregate vector read buffers.
Not a process-memory cap; standard Read::read_to_end and explicit
positional file reads remain caller-managed.
stream_chunk_bytes: usizeDefault request size for client read_stream, not file Read or pools.
max_directory_entries: usizeAggregate entries delivered/collected by a directory call or tree walk.
max_directory_path_bytes: usizeAggregate logical path bytes, excluding allocator and metadata overhead.
max_walk_depth: usizeMaximum descent depth; the starting directory is depth zero.
Implementations§
Source§impl ResourceLimits
impl ResourceLimits
pub fn directory_options(self) -> ReadDirOptions
pub fn walk_options(self) -> WalkOptions
Trait Implementations§
Source§impl Clone for ResourceLimits
impl Clone for ResourceLimits
Source§fn clone(&self) -> ResourceLimits
fn clone(&self) -> ResourceLimits
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 ResourceLimits
Source§impl Debug for ResourceLimits
impl Debug for ResourceLimits
Source§impl Default for ResourceLimits
impl Default for ResourceLimits
Source§fn default() -> ResourceLimits
fn default() -> ResourceLimits
Returns the “default value” for a type. Read more
impl Eq for ResourceLimits
Source§impl PartialEq for ResourceLimits
impl PartialEq for ResourceLimits
impl StructuralPartialEq for ResourceLimits
Auto Trait Implementations§
impl Freeze for ResourceLimits
impl RefUnwindSafe for ResourceLimits
impl Send for ResourceLimits
impl Sync for ResourceLimits
impl Unpin for ResourceLimits
impl UnsafeUnpin for ResourceLimits
impl UnwindSafe for ResourceLimits
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