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 PartialEq for Version
impl PartialEq for Version
source§impl PartialOrd for Version
impl PartialOrd for Version
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl Copy for Version
impl Eq for Version
impl StructuralEq for Version
impl StructuralPartialEq for Version
Auto Trait Implementations§
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
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.