Struct bonsaidb_core::connection::Range
source · [−]Expand description
A range type that can represent all std range types and be serialized.
This type implements conversion operations from all range types defined in
std.
Fields
start: Bound<T>The start of the range.
end: Bound<T>The end of the range.
Implementations
sourceimpl<T> Range<T>
impl<T> Range<T>
sourcepub fn after(self, excluded_start: T) -> Self
pub fn after(self, excluded_start: T) -> Self
Sets the start bound of this range to Bound::Excluded with
excluded_start. The range will represent values that are
Ordering::Greater than, but not
including, excluded_start.
sourcepub fn start_at(self, included_start: T) -> Self
pub fn start_at(self, included_start: T) -> Self
Sets the start bound of this range to Bound::Included with
included_start. The range will represent values that are
Ordering::Greater than or
Ordering::Equal to included_start.
sourcepub fn before(self, excluded_end: T) -> Self
pub fn before(self, excluded_end: T) -> Self
Sets the end bound of this range to Bound::Excluded with
excluded_end. The range will represent values that are
Ordering::Less than, but not including,
excluded_end.
sourcepub fn end_at(self, included_end: T) -> Self
pub fn end_at(self, included_end: T) -> Self
Sets the end bound of this range to Bound::Included with
included_end. The range will represent values that are
Ordering:::Less than or
Ordering::Equal to included_end.
sourcepub fn map<U, F: Fn(T) -> U>(self, map: F) -> Range<U>
pub fn map<U, F: Fn(T) -> U>(self, map: F) -> Range<U>
Maps each contained value with the function provided.
sourceimpl<'a, T> Range<T>
impl<'a, T> Range<T>
sourcepub fn as_ord_bytes<K>(&'a self) -> Result<Range<Bytes>, T::Error> where
T: KeyEncoding<'a, K>,
K: for<'k> Key<'k>,
pub fn as_ord_bytes<K>(&'a self) -> Result<Range<Bytes>, T::Error> where
T: KeyEncoding<'a, K>,
K: for<'k> Key<'k>,
Serializes the range’s contained values to big-endian bytes.
Trait Implementations
sourceimpl<'de, T> Deserialize<'de> for Range<T> where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for Range<T> where
T: Deserialize<'de>,
sourcefn 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
sourceimpl<T: Clone> From<RangeInclusive<T>> for Range<T>
impl<T: Clone> From<RangeInclusive<T>> for Range<T>
sourcefn from(range: RangeInclusive<T>) -> Self
fn from(range: RangeInclusive<T>) -> Self
Converts to this type from the input type.
sourceimpl<T> From<RangeToInclusive<T>> for Range<T>
impl<T> From<RangeToInclusive<T>> for Range<T>
sourcefn from(range: RangeToInclusive<T>) -> Self
fn from(range: RangeToInclusive<T>) -> Self
Converts to this type from the input type.
sourceimpl<T> RangeBounds<T> for Range<T>
impl<T> RangeBounds<T> for Range<T>
impl<T: Copy> Copy for Range<T>
impl<T: Eq> Eq for Range<T>
impl<T> StructuralEq for Range<T>
impl<T> StructuralPartialEq for Range<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for Range<T> where
T: RefUnwindSafe,
impl<T> Send for Range<T> where
T: Send,
impl<T> Sync for Range<T> where
T: Sync,
impl<T> Unpin for Range<T> where
T: Unpin,
impl<T> UnwindSafe for Range<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more