Enum proof_of_sql::base::commitment::Bounds   
source · pub enum Bounds<T>where
    T: Ord,{
    Empty,
    Bounded(BoundsInner<T>),
    Sharp(BoundsInner<T>),
}Expand description
Minimum and maximum values (inclusive) of a collection of data, with some other variants for edge cases.
Variants§
Empty
The source collection is empty so has no bounds.
Bounded(BoundsInner<T>)
After some operation (like Bounds::difference), the bounds cannot be determined exactly.
Instead, this variant underestimates the minimum and overestimates the maximum.
Sharp(BoundsInner<T>)
The exact bounds of the values of the source collection (inclusive).
Implementations§
source§impl<T> Bounds<T>where
    T: Ord,
 
impl<T> Bounds<T>where
    T: Ord,
sourcepub fn sharp(min: T, max: T) -> Result<Self, NegativeBounds>
 
pub fn sharp(min: T, max: T) -> Result<Self, NegativeBounds>
Construct a new Bounds::Sharp.
Returns an error if min > max.
sourcepub fn bounded(min: T, max: T) -> Result<Self, NegativeBounds>
 
pub fn bounded(min: T, max: T) -> Result<Self, NegativeBounds>
Construct a new Bounds::bounded.
Returns an error if min > max.
Trait Implementations§
source§impl<'de, T> Deserialize<'de> for Bounds<T>where
    T: Ord + Deserialize<'de>,
 
impl<'de, T> Deserialize<'de> for Bounds<T>where
    T: Ord + Deserialize<'de>,
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<'a, T> FromIterator<&'a T> for Bounds<T>
 
impl<'a, T> FromIterator<&'a T> for Bounds<T>
impl<T> Copy for Bounds<T>
impl<T> Eq for Bounds<T>
impl<T> StructuralPartialEq for Bounds<T>where
    T: Ord,
Auto Trait Implementations§
impl<T> Freeze for Bounds<T>where
    T: Freeze,
impl<T> RefUnwindSafe for Bounds<T>where
    T: RefUnwindSafe,
impl<T> Send for Bounds<T>where
    T: Send,
impl<T> Sync for Bounds<T>where
    T: Sync,
impl<T> Unpin for Bounds<T>where
    T: Unpin,
impl<T> UnwindSafe for Bounds<T>where
    T: UnwindSafe,
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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
 
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
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.source§impl<T> Instrument for T
 
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
 
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
 
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
 
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
 
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
 
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more