pub struct MetadataFetchLimits {
pub max_response_bytes: usize,
pub max_candidates: usize,
}Expand description
What: Bound one official-package metadata response and candidate scan.
Inputs:
- Constructed by callers before fetching a package detail response.
Output:
- Maximum bytes read and result candidates considered for one request.
Details:
- The response bound is enforced before JSON parsing.
- The candidate bound prevents a broad endpoint response from expanding a single-package detail lookup into unbounded parsing work.
Fields§
§max_response_bytes: usizeMaximum response-body bytes accepted before JSON parsing.
max_candidates: usizeMaximum API result rows considered while selecting an exact package.
Trait Implementations§
Source§impl Clone for MetadataFetchLimits
impl Clone for MetadataFetchLimits
Source§fn clone(&self) -> MetadataFetchLimits
fn clone(&self) -> MetadataFetchLimits
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 MetadataFetchLimits
Source§impl Debug for MetadataFetchLimits
impl Debug for MetadataFetchLimits
Source§impl Default for MetadataFetchLimits
impl Default for MetadataFetchLimits
Source§impl<'de> Deserialize<'de> for MetadataFetchLimits
impl<'de> Deserialize<'de> for MetadataFetchLimits
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 MetadataFetchLimits
Source§impl PartialEq for MetadataFetchLimits
impl PartialEq for MetadataFetchLimits
Source§impl Serialize for MetadataFetchLimits
impl Serialize for MetadataFetchLimits
impl StructuralPartialEq for MetadataFetchLimits
Auto Trait Implementations§
impl Freeze for MetadataFetchLimits
impl RefUnwindSafe for MetadataFetchLimits
impl Send for MetadataFetchLimits
impl Sync for MetadataFetchLimits
impl Unpin for MetadataFetchLimits
impl UnsafeUnpin for MetadataFetchLimits
impl UnwindSafe for MetadataFetchLimits
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
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>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.