Struct janetrs_version::JanetVersion[][src]

pub struct JanetVersion { /* fields omitted */ }

Janet version representation.

It has convenient comparison operators implementations with triples (u32, u32, u32), arrays [u32; 3] and str.

Implementations

impl JanetVersion[src]

pub const fn current() -> Self[src]

Get the current Janet version.

pub const fn custom(major: u32, minor: u32, patch: u32) -> Self[src]

Create a custom JanetVersion given the version number.

Mostly used to check if current version match a requirement for your code.

pub const fn major(&self) -> u32[src]

Return the Janet major version.

pub const fn minor(&self) -> u32[src]

Return the Janet minor version.

pub const fn patch(&self) -> u32[src]

Return the Janet patch version.

Trait Implementations

impl Clone for JanetVersion[src]

impl Copy for JanetVersion[src]

impl Debug for JanetVersion[src]

impl Display for JanetVersion[src]

impl Eq for JanetVersion[src]

impl Hash for JanetVersion[src]

impl Ord for JanetVersion[src]

impl PartialEq<&'_ str> for JanetVersion[src]

impl PartialEq<[u32; 3]> for JanetVersion[src]

impl PartialEq<(u32, u32, u32)> for JanetVersion[src]

impl PartialEq<JanetVersion> for JanetVersion[src]

impl PartialOrd<&'_ str> for JanetVersion[src]

impl PartialOrd<[u32; 3]> for JanetVersion[src]

impl PartialOrd<(u32, u32, u32)> for JanetVersion[src]

impl PartialOrd<JanetVersion> for JanetVersion[src]

impl StructuralEq for JanetVersion[src]

impl StructuralPartialEq for JanetVersion[src]

Auto Trait Implementations

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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.