Enum bonsaidb::core::connection::Bound
source · pub enum Bound<T> {
Unbounded,
Included(T),
Excluded(T),
}
Expand description
A range bound that can be serialized.
Variants§
Unbounded
No bound.
Included(T)
Bounded by the contained value (inclusive).
Excluded(T)
Bounded by the contained value (exclusive).
Implementations§
source§impl<T> Bound<T>
impl<T> Bound<T>
sourcepub fn map<U, F>(self, map: F) -> Bound<U>where
F: Fn(T) -> U,
pub fn map<U, F>(self, map: F) -> Bound<U>where
F: Fn(T) -> U,
Maps the contained value, if any, and returns the resulting Bound
.
sourcepub fn map_result<U, E, F>(self, map: F) -> Result<Bound<U>, E>
pub fn map_result<U, E, F>(self, map: F) -> Result<Bound<U>, E>
Maps the contained value with the function provided. The callback’s
return type is a Result, unlike with map
.
Trait Implementations§
source§impl<'de, T> Deserialize<'de> for Bound<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for Bound<T>where
T: Deserialize<'de>,
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<Bound<T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<Bound<T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<T> PartialEq for Bound<T>where
T: PartialEq,
impl<T> PartialEq for Bound<T>where
T: PartialEq,
source§impl<T> Serialize for Bound<T>where
T: Serialize,
impl<T> Serialize for Bound<T>where
T: Serialize,
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<T> Copy for Bound<T>where
T: Copy,
impl<T> Eq for Bound<T>where
T: Eq,
impl<T> StructuralEq for Bound<T>
impl<T> StructuralPartialEq for Bound<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for Bound<T>where
T: RefUnwindSafe,
impl<T> Send for Bound<T>where
T: Send,
impl<T> Sync for Bound<T>where
T: Sync,
impl<T> Unpin for Bound<T>where
T: Unpin,
impl<T> UnwindSafe for Bound<T>where
T: UnwindSafe,
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
§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.