Struct glibc_version::Version[][src]

pub struct Version {
    pub major: usize,
    pub minor: usize,
}

Crate to help rust projects discover GNU libc version at build time. Expected to be used in build.rs. Note that this crate is only expected to work under cfg(target_env = "gnu"), so please guard the usage under relevant configuration predicates.

Example

let ver = glibc_version::get_version().unwrap();
if ver.major >= 2 && ver.minor >= 28 {
   println!("cargo:rustc-cfg=glibc_renameat2");
}

Fields

major: usizeminor: usize

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.