Struct botan::Version[][src]

pub struct Version {
    pub major: u32,
    pub minor: u32,
    pub patch: u32,
    pub release_date: u32,
    pub ffi_api: u32,
    pub string: String,
}

Information about the library version

Fields

major: u32

The major version of the library

minor: u32

The minor version of the library

patch: u32

The patch version of the library

release_date: u32

The release date of the library, as YYYYMMDD, for example 2.7.0 has value 20180702. Will be 0 for unreleased versions.

ffi_api: u32

The version of the FFI API, as a YYYYMMDD field.

string: String

A free-form string describing the library version

Implementations

impl Version[src]

pub fn current() -> Result<Version>[src]

Read the version information of the currently linked lib

#[must_use]pub fn at_least(&self, major: u32, minor: u32) -> bool[src]

Return true if the current version is at least as high as the major and minor numbers passed as arguments

#[must_use]pub fn supports_version(version: u32) -> bool[src]

Return true if the specified API version is supported by this version of the library.

Examples

assert_eq!(botan::Version::supports_version(42), false);
assert_eq!(botan::Version::supports_version(20180713), true);

Trait Implementations

impl Debug for Version[src]

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

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

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

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

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

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

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.

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.