pub struct GraphLimits { /* private fields */ }Expand description
Hard bounded retrieval limits accepted by repository graph consumers.
Implementations§
Source§impl GraphLimits
impl GraphLimits
Sourcepub const MAX_OCCURRENCES: u32 = 1_024
pub const MAX_OCCURRENCES: u32 = 1_024
Absolute occurrence ceiling for any one logical relation.
Sourcepub const MAX_OUTPUT_BYTES: u32
pub const MAX_OUTPUT_BYTES: u32
Absolute encoded-output ceiling.
Sourcepub fn new(
rows: u32,
occurrences: u32,
depth: u32,
output_bytes: u32,
) -> Result<Self, GraphContractError>
pub fn new( rows: u32, occurrences: u32, depth: u32, output_bytes: u32, ) -> Result<Self, GraphContractError>
Validate result-defining hard limits.
§Errors
Returns an error for zero values or values above absolute ceilings.
Sourcepub const fn occurrences(self) -> u32
pub const fn occurrences(self) -> u32
Return the per-relation occurrence limit.
Sourcepub const fn output_bytes(self) -> u32
pub const fn output_bytes(self) -> u32
Return the encoded-output byte limit.
Trait Implementations§
Source§impl Clone for GraphLimits
impl Clone for GraphLimits
Source§fn clone(&self) -> GraphLimits
fn clone(&self) -> GraphLimits
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GraphLimits
impl Debug for GraphLimits
Source§impl<'de> Deserialize<'de> for GraphLimits
impl<'de> Deserialize<'de> for GraphLimits
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
Source§impl PartialEq for GraphLimits
impl PartialEq for GraphLimits
Source§impl Serialize for GraphLimits
impl Serialize for GraphLimits
impl Copy for GraphLimits
impl Eq for GraphLimits
impl StructuralPartialEq for GraphLimits
Auto Trait Implementations§
impl Freeze for GraphLimits
impl RefUnwindSafe for GraphLimits
impl Send for GraphLimits
impl Sync for GraphLimits
impl Unpin for GraphLimits
impl UnwindSafe for GraphLimits
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<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.