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
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
impl From<&Version> for PartialVersion
Convert a Version into a PartialVersion.
source§impl 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
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)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§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