pub struct AcceptOptions {
pub max_object_count: usize,
pub max_total_bytes: usize,
}Expand description
DC-86 resource bound for accept_exchange_artifact, checked before any decode or write –
the same shape BundleImportOptions gives import_bundle.
Fields§
§max_object_count: usizeMaximum any one of the artifact’s four declared counts (patches, blobs, author keys, claims) may be. Refused before the section it governs is decoded.
max_total_bytes: usizeMaximum encoded byte length the artifact may have. Refused before decoding starts at all.
Implementations§
Source§impl AcceptOptions
impl AcceptOptions
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 declared 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 AcceptOptions
impl Clone for AcceptOptions
Source§fn clone(&self) -> AcceptOptions
fn clone(&self) -> AcceptOptions
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 AcceptOptions
Source§impl Debug for AcceptOptions
impl Debug for AcceptOptions
impl Eq for AcceptOptions
Source§impl PartialEq for AcceptOptions
impl PartialEq for AcceptOptions
impl StructuralPartialEq for AcceptOptions
Auto Trait Implementations§
impl Freeze for AcceptOptions
impl RefUnwindSafe for AcceptOptions
impl Send for AcceptOptions
impl Sync for AcceptOptions
impl Unpin for AcceptOptions
impl UnsafeUnpin for AcceptOptions
impl UnwindSafe for AcceptOptions
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