Trait postgres_range::Normalizable
[−]
[src]
pub trait Normalizable: Sized {
fn normalize<S>(bound: RangeBound<S, Self>) -> RangeBound<S, Self> where S: BoundSided;
}
A trait that normalizes a range bound for a type
Required Methods
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.
Implementors
impl Normalizable for i32
impl Normalizable for i64
impl Normalizable for Timespec