pub struct Extent { /* private fields */ }Expand description
Implementations§
Source§impl Extent
impl Extent
Sourcepub fn range(ts: Range<Timestamp>) -> Self
pub fn range(ts: Range<Timestamp>) -> Self
Create an extent for a range.
The end of the range should be after the start, but an empty range is still considered a range.
Sourcepub fn as_point(&self) -> &Timestamp
pub fn as_point(&self) -> &Timestamp
Get the extent as a point in time.
For point extents, this will return exactly the value the extent was created from. For range extents, this will return the end bound.
Sourcepub fn as_range(&self) -> Option<&Range<Timestamp>>
pub fn as_range(&self) -> Option<&Range<Timestamp>>
Try get the extent as a range.
This method will return Some if the extent is a range, even if that range is empty. It will return None for point extents.
Trait Implementations§
Source§impl Props for Extent
impl Props for Extent
Source§fn for_each<'kv, F: FnMut(Str<'kv>, Value<'kv>) -> ControlFlow<()>>(
&'kv self,
for_each: F,
) -> ControlFlow<()>
fn for_each<'kv, F: FnMut(Str<'kv>, Value<'kv>) -> ControlFlow<()>>( &'kv self, for_each: F, ) -> ControlFlow<()>
Source§fn get<'v, K: ToStr>(&'v self, key: K) -> Option<Value<'v>>
fn get<'v, K: ToStr>(&'v self, key: K) -> Option<Value<'v>>
Get the value for a given key, if it’s present. Read more
Source§fn pull<'kv, V: FromValue<'kv>, K: ToStr>(&'kv self, key: K) -> Option<V>
fn pull<'kv, V: FromValue<'kv>, K: ToStr>(&'kv self, key: K) -> Option<V>
Get the value for a given key, if it’s present as an instance of
V. Read moreSource§fn and_props<U: Props>(self, other: U) -> And<Self, U>where
Self: Sized,
fn and_props<U: Props>(self, other: U) -> And<Self, U>where
Self: Sized,
Concatenate
other to the end of self.Source§fn filter<F: Fn(Str<'_>, Value<'_>) -> bool>(self, filter: F) -> Filter<Self, F>where
Self: Sized,
fn filter<F: Fn(Str<'_>, Value<'_>) -> bool>(self, filter: F) -> Filter<Self, F>where
Self: Sized,
Filter the set of properties. Read more
Source§fn collect<'kv, C: FromProps<'kv>>(&'kv self) -> C
fn collect<'kv, C: FromProps<'kv>>(&'kv self) -> C
Collect these properties into another collection type. Read more
Source§fn as_map(&self) -> &AsMap<Self>where
Self: Sized,
fn as_map(&self) -> &AsMap<Self>where
Self: Sized,
Get an adapter that will serialize properties as a map.
Source§fn dedup(&self) -> &Dedup<Self>where
Self: Sized,
fn dedup(&self) -> &Dedup<Self>where
Self: Sized,
Lazily de-duplicate properties in the collection. Read more
Auto Trait Implementations§
impl Freeze for Extent
impl RefUnwindSafe for Extent
impl Send for Extent
impl Sync for Extent
impl Unpin for Extent
impl UnsafeUnpin for Extent
impl UnwindSafe for Extent
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