pub struct ApiVisibilityLimits { /* private fields */ }Expand description
Fail-closed resource limits for canonicalizing one API visibility view.
Root JSON values have depth one. max_nodes counts every array, object, and
scalar value, while max_fields counts object members across the complete
tree. max_canonical_bytes is applied independently to the full-resource
stream and the fields-only schema stream.
Limits are serialized so a host can persist the policy used for a replay. Deserialization revalidates every value, rejects unknown fields, and never permits a persisted policy to exceed the compiled hard ceilings.
Implementations§
Source§impl ApiVisibilityLimits
impl ApiVisibilityLimits
Sourcepub fn new(
max_depth: u16,
max_nodes: u32,
max_fields: u32,
max_canonical_bytes: u64,
) -> Result<Self, ApiVisibilityEvidenceError>
pub fn new( max_depth: u16, max_nodes: u32, max_fields: u32, max_canonical_bytes: u64, ) -> Result<Self, ApiVisibilityEvidenceError>
Creates a validated canonicalization envelope.
Sourcepub const fn max_fields(self) -> u32
pub const fn max_fields(self) -> u32
Returns the inclusive object-member count limit.
Sourcepub const fn max_canonical_bytes(self) -> u64
pub const fn max_canonical_bytes(self) -> u64
Returns the inclusive byte limit for each canonical signature stream.
Trait Implementations§
Source§impl Clone for ApiVisibilityLimits
impl Clone for ApiVisibilityLimits
Source§fn clone(&self) -> ApiVisibilityLimits
fn clone(&self) -> ApiVisibilityLimits
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 ApiVisibilityLimits
Source§impl Debug for ApiVisibilityLimits
impl Debug for ApiVisibilityLimits
Source§impl Default for ApiVisibilityLimits
impl Default for ApiVisibilityLimits
Source§impl<'de> Deserialize<'de> for ApiVisibilityLimits
impl<'de> Deserialize<'de> for ApiVisibilityLimits
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ApiVisibilityLimits
Source§impl PartialEq for ApiVisibilityLimits
impl PartialEq for ApiVisibilityLimits
Source§impl Serialize for ApiVisibilityLimits
impl Serialize for ApiVisibilityLimits
impl StructuralPartialEq for ApiVisibilityLimits
Auto Trait Implementations§
impl Freeze for ApiVisibilityLimits
impl RefUnwindSafe for ApiVisibilityLimits
impl Send for ApiVisibilityLimits
impl Sync for ApiVisibilityLimits
impl Unpin for ApiVisibilityLimits
impl UnsafeUnpin for ApiVisibilityLimits
impl UnwindSafe for ApiVisibilityLimits
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§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.§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