pub struct Bounds<Q: Quantity> { /* private fields */ }Expand description
A set of lower and upper bounds for any metric.
Implementations§
Source§impl<Q: Quantity> Bounds<Q>
impl<Q: Quantity> Bounds<Q>
Sourcepub fn new(lower: Option<Q>, upper: Option<Q>) -> Self
pub fn new(lower: Option<Q>, upper: Option<Q>) -> Self
Creates a new Bounds with the given lower and upper bounds.
Sourcepub fn combine_parallel(&self, other: &Self) -> Vec<Self>
pub fn combine_parallel(&self, other: &Self) -> Vec<Self>
Combines two bounds as if their components were connected in parallel.
Sourcepub fn intersect(&self, other: &Self) -> Option<Self>
pub fn intersect(&self, other: &Self) -> Option<Self>
Returns the intersection of self and other, or None if the
intersection is empty.
Sourcepub fn merge_if_overlapping(&self, other: &Self) -> Option<Self>
pub fn merge_if_overlapping(&self, other: &Self) -> Option<Self>
If self and other overlap, returns the smallest single interval
that contains both; otherwise returns None.
Trait Implementations§
Source§impl From<Bounds<ReactivePower>> for Bounds
impl From<Bounds<ReactivePower>> for Bounds
Source§fn from(bounds: Bounds<ReactivePower>) -> Self
fn from(bounds: Bounds<ReactivePower>) -> Self
Converts to this type from the input type.
impl<Q: Quantity> StructuralPartialEq for Bounds<Q>
Auto Trait Implementations§
impl<Q> Freeze for Bounds<Q>where
Q: Freeze,
impl<Q> RefUnwindSafe for Bounds<Q>where
Q: RefUnwindSafe,
impl<Q> Send for Bounds<Q>
impl<Q> Sync for Bounds<Q>
impl<Q> Unpin for Bounds<Q>where
Q: Unpin,
impl<Q> UnsafeUnpin for Bounds<Q>where
Q: UnsafeUnpin,
impl<Q> UnwindSafe for Bounds<Q>where
Q: 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§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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request