pub enum Version {
Pre10(u32, u32, u32),
Post10(u32, u32),
}
Expand description
Represents a full PostgreSQL version. This is the kind of thing we see when
running pg_ctl --version
for example.
The “Current minor” column shown on the PostgreSQL “Versioning Policy” page is what this models.
Variants§
Pre10(u32, u32, u32)
Pre-PostgreSQL 10, with major, point, and minor version numbers, e.g. 9.6.17. It is an error to create this variant with a major number >= 10.
Post10(u32, u32)
PostgreSQL 10+, with major and minor version number, e.g. 10.3. It is an error to create this variant with a major number < 10.
Trait Implementations§
Source§impl From<&PartialVersion> for Version
Convert a PartialVersion
into a Version
that’s useful for
comparisons.
impl From<&PartialVersion> for Version
Convert a PartialVersion
into a Version
that’s useful for
comparisons.
The Version
returned has 0 (zero) in the place of the missing parts. For
example, a partial version of 9.6.*
becomes 9.6.0
, and 12.*
becomes
12.0
.
Source§fn from(partial: &PartialVersion) -> Self
fn from(partial: &PartialVersion) -> Self
Source§impl From<&Version> for PartialVersion
Convert a Version
into a PartialVersion
.
impl From<&Version> for PartialVersion
Convert a Version
into a PartialVersion
.
Source§impl From<PartialVersion> for Version
See From<&PartialVersion> for Version
.
impl From<PartialVersion> for Version
See From<&PartialVersion> for Version
.
Source§fn from(partial: PartialVersion) -> Self
fn from(partial: PartialVersion) -> Self
Source§impl From<Version> for PartialVersion
See From<&Version> for PartialVersion
.
impl From<Version> for PartialVersion
See From<&Version> for PartialVersion
.
Source§impl Ord for Version
impl Ord for Version
Source§impl PartialOrd for Version
impl PartialOrd for Version
impl Copy for Version
impl Eq for Version
impl StructuralPartialEq for Version
Auto Trait Implementations§
impl Freeze for Version
impl RefUnwindSafe for Version
impl Send for Version
impl Sync for Version
impl Unpin for Version
impl UnwindSafe for Version
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.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