Trait postgres_range::Normalizable
source · [−]pub trait Normalizable: Sized {
fn normalize<S>(bound: RangeBound<S, Self>) -> RangeBound<S, Self>
where
S: BoundSided;
}
Expand description
A trait that normalizes a range bound for a type
Required Methods
sourcefn normalize<S>(bound: RangeBound<S, Self>) -> RangeBound<S, Self>where
S: BoundSided,
fn normalize<S>(bound: RangeBound<S, Self>) -> RangeBound<S, Self>where
S: BoundSided,
Given a range bound, returns the normalized version of that bound. For discrete types such as i32, the normalized lower bound is always inclusive and the normalized upper bound is always exclusive. Other types, such as Timespec, have no normalization process so their implementation is a no-op.
The logic here should match the logic performed by the equivalent Postgres type.