pub struct BundleImportOptions {
pub max_object_count: usize,
pub max_total_bytes: usize,
}Expand description
DC-86 resource bound for import_bundle, checked before any object is decoded or written —
DC-57’s shape: a hard block ahead of any write, with a documented default the CLI may override.
Fields§
§max_object_count: usizeMaximum objects a bundle may declare. Refused before the decode loop runs.
max_total_bytes: usizeMaximum encoded byte length a bundle may have. Refused before decode_bundle runs at all.
Implementations§
Source§impl BundleImportOptions
impl BundleImportOptions
Sourcepub const fn default_limits() -> Self
pub const fn default_limits() -> Self
Sourcepub const fn with_max_object_count(self, max_object_count: usize) -> Self
pub const fn with_max_object_count(self, max_object_count: usize) -> Self
Override the maximum object count.
Sourcepub const fn with_max_total_bytes(self, max_total_bytes: usize) -> Self
pub const fn with_max_total_bytes(self, max_total_bytes: usize) -> Self
Override the maximum total encoded byte length.
Trait Implementations§
Source§impl Clone for BundleImportOptions
impl Clone for BundleImportOptions
Source§fn clone(&self) -> BundleImportOptions
fn clone(&self) -> BundleImportOptions
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 BundleImportOptions
Source§impl Debug for BundleImportOptions
impl Debug for BundleImportOptions
impl Eq for BundleImportOptions
Source§impl PartialEq for BundleImportOptions
impl PartialEq for BundleImportOptions
impl StructuralPartialEq for BundleImportOptions
Auto Trait Implementations§
impl Freeze for BundleImportOptions
impl RefUnwindSafe for BundleImportOptions
impl Send for BundleImportOptions
impl Sync for BundleImportOptions
impl Unpin for BundleImportOptions
impl UnsafeUnpin for BundleImportOptions
impl UnwindSafe for BundleImportOptions
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