[][src]Struct yy_boss::ResourceVersion

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

A struct, which implements Serialize and Deserialize, for Gms2 version strings of the form "1.0" or "4.2". Basically, a bad SemVer.

Fields

major: usize

The major version of the Resource. Defaults to 1

minor: usize

The minor version of the Resource. Defaults to 0

Implementations

impl ResourceVersion[src]

pub fn new(major: usize, minor: usize) -> ResourceVersion[src]

Creates a new default ResourceVersion with the major and minor version given. The default implementation runs this with 1 and 0. ResourceVersion::blank is a shorthand for ResourceVersion::new(0, 0).

let default = ResourceVersion::new(1, 0);
assert_eq!(default, ResourceVersion { major: 1, minor: 0 });

pub fn blank() -> ResourceVersion[src]

Creates a new blank ResourceVersion with the major and minor version set to 0.0. This is not the default.

let blank = ResourceVersion::blank();
assert_eq!(default, ResourceVersion { major: 0, minor: 0 });

Trait Implementations

impl Clone for ResourceVersion[src]

impl Copy for ResourceVersion[src]

impl Debug for ResourceVersion[src]

impl Default for ResourceVersion[src]

impl<'de> Deserialize<'de> for ResourceVersion[src]

impl Display for ResourceVersion[src]

impl Eq for ResourceVersion[src]

impl FromStr for ResourceVersion[src]

type Err = ResourceVersionParseErr

The associated error which can be returned from parsing.

impl Hash for ResourceVersion[src]

impl Ord for ResourceVersion[src]

impl PartialEq<ResourceVersion> for ResourceVersion[src]

impl PartialOrd<ResourceVersion> for ResourceVersion[src]

impl Serialize for ResourceVersion[src]

impl YypSerialization for ResourceVersion[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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

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

impl<T> SetParameter for T

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,