pub struct TimeRangeBoundBuilder(/* private fields */);Expand description
Accumulator used by TimeRangeBounds::build_intersect
Provided to the user’s logic callback by TimeRangeBound::build_intersect
There is no other way to obtain a TimeRangeBoundBuilder.
Implementations§
Source§impl TimeRangeBoundBuilder
impl TimeRangeBoundBuilder
Sourcepub fn incorporate_unwrap<Component: TimeBound>(
&mut self,
component: Component,
) -> Component::Inner
pub fn incorporate_unwrap<Component: TimeBound>( &mut self, component: Component, ) -> Component::Inner
Handle a TimeBound, ensuring its validity range will be honoured
This is equivalent to TimeBound::unwrap_with,
which is normally more convenient.
§CORRECTNESS
See TimeBound::unwrap_with and TimeRangeBound::build_intersect.
Sourcepub fn intersect_bounds(&mut self, bounds: TimeRange)
pub fn intersect_bounds(&mut self, bounds: TimeRange)
Narrow the bounds of self to the overlap with bounds
Equivalent to .as_mut_range().intersect_bounds().
Sourcepub fn as_mut_range(&mut self) -> &mut TimeRange
pub fn as_mut_range(&mut self) -> &mut TimeRange
Mutably access the being-built time range.
This range is the intersection of all the ranges
from calls to incorporate_unwrap and
intersect_bounds.
§CORRECTNESS
Normally it is only correct to narrow the range, not widen it. Getting the time range right is the responsibility of the caller.
Consider intersect_bounds instead.
Auto Trait Implementations§
impl Freeze for TimeRangeBoundBuilder
impl RefUnwindSafe for TimeRangeBoundBuilder
impl Send for TimeRangeBoundBuilder
impl Sync for TimeRangeBoundBuilder
impl Unpin for TimeRangeBoundBuilder
impl UnsafeUnpin for TimeRangeBoundBuilder
impl UnwindSafe for TimeRangeBoundBuilder
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>
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>
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