# pyo3::PythonVersionInfo - Rust
Represents the major, minor, and patch (if any) versions of this interpreter.
Keywords: rust, rustlang, rust-lang, PythonVersionInfo

# Struct pyo3::PythonVersionInfo [−] [src]

    pub struct PythonVersionInfo<'p> {
        pub major: u8,
        pub minor: u8,
        pub patch: u8,
        pub suffix: Option<&'p str>,
    }

Represents the major, minor, and patch (if any) versions of this interpreter.

See Python::version.

## Fields

`major: u8` `minor: u8` `patch: u8` `suffix: Option<&'p str>`

## Trait Implementations

### `impl<'p> Debug for PythonVersionInfo<'p>` [src]

#### `fn fmt(&self, f: &mut Formatter<'_>) -> Result` [src]

Formats the value using the given formatter. Read more

### `impl PartialEq<(u8, u8, u8)> for PythonVersionInfo<'_>` [src]

#### `fn eq(&self, other: &(u8, u8, u8)) -> bool` [src]

This method tests for `self` and `other` values to be equal, and is used by `==`. Read more

#### `#[must_use]pub fn ne(&self, other: &Rhs) -> bool` 1.0.0 [src]

This method tests for `!=`.

### `impl PartialEq<(u8, u8)> for PythonVersionInfo<'_>` [src]

#### `fn eq(&self, other: &(u8, u8)) -> bool` [src]

This method tests for `self` and `other` values to be equal, and is used by `==`. Read more

#### `#[must_use]pub fn ne(&self, other: &Rhs) -> bool` 1.0.0 [src]

This method tests for `!=`.

### `impl PartialOrd<(u8, u8, u8)> for PythonVersionInfo<'_>` [src]

#### `fn partial_cmp(&self, other: &(u8, u8, u8)) -> Option<Ordering>` [src]

This method returns an ordering between `self` and `other` values if one exists. Read more

#### `#[must_use]pub fn lt(&self, other: &Rhs) -> bool` 1.0.0 [src]

This method tests less than (for `self` and `other`) and is used by the `<` operator. Read more

#### `#[must_use]pub fn le(&self, other: &Rhs) -> bool` 1.0.0 [src]

This method tests less than or equal to (for `self` and `other`) and is used by the `<=` operator. Read more

#### `#[must_use]pub fn gt(&self, other: &Rhs) -> bool` 1.0.0 [src]

This method tests greater than (for `self` and `other`) and is used by the `>` operator. Read more

#### `#[must_use]pub fn ge(&self, other: &Rhs) -> bool` 1.0.0 [src]

This method tests greater than or equal to (for `self` and `other`) and is used by the `>=` operator. Read more

### `impl PartialOrd<(u8, u8)> for PythonVersionInfo<'_>` [src]

#### `fn partial_cmp(&self, other: &(u8, u8)) -> Option<Ordering>` [src]

This method returns an ordering between `self` and `other` values if one exists. Read more

#### `#[must_use]pub fn lt(&self, other: &Rhs) -> bool` 1.0.0 [src]

This method tests less than (for `self` and `other`) and is used by the `<` operator. Read more

#### `#[must_use]pub fn le(&self, other: &Rhs) -> bool` 1.0.0 [src]

This method tests less than or equal to (for `self` and `other`) and is used by the `<=` operator. Read more

#### `#[must_use]pub fn gt(&self, other: &Rhs) -> bool` 1.0.0 [src]

This method tests greater than (for `self` and `other`) and is used by the `>` operator. Read more

#### `#[must_use]pub fn ge(&self, other: &Rhs) -> bool` 1.0.0 [src]

This method tests greater than or equal to (for `self` and `other`) and is used by the `>=` operator. Read more

## Auto Trait Implementations

### `impl<'p> RefUnwindSafe for PythonVersionInfo<'p>`

### `impl<'p> Send for PythonVersionInfo<'p>`

### `impl<'p> Sync for PythonVersionInfo<'p>`

### `impl<'p> Unpin for PythonVersionInfo<'p>`

### `impl<'p> UnwindSafe for PythonVersionInfo<'p>`

## Blanket Implementations

### `impl<T> Any for T where
T: 'static + ?Sized,` [src]

#### `pub fn type_id(&self) -> TypeId` [src]

Gets the `TypeId` of `self`. Read more

### `impl<T> Borrow<T> for T where
T: ?Sized,` [src]

#### `pub fn borrow(&self) -> &T` [src]

Immutably borrows from an owned value. Read more

### `impl<T> BorrowMut<T> for T where
T: ?Sized,` [src]

#### `pub fn borrow_mut(&mut self) -> &mut T` [src]

Mutably borrows from an owned value. Read more

### `impl<T> From<T> for T` [src]

#### `pub fn from(t: T) -> T` [src]

Performs the conversion.

### `impl<T, U> Into<U> for T where
U: From<T>,` [src]

#### `pub fn into(self) -> U` [src]

Performs the conversion.

### `impl<T, U> TryFrom<U> for T where
U: Into<T>,` [src]

#### `type Error = Infallible`

The type returned in the event of a conversion error.

#### `pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>` [src]

Performs the conversion.

### `impl<T, U> TryInto<U> for T where
U: TryFrom<T>,` [src]

#### `type Error = <U as TryFrom<T>>::Error`

The type returned in the event of a conversion error.

#### `pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>` [src]

Performs the conversion.