Struct yy_typings::ResourceVersion [−][src]
Expand description
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
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 });
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
fn deserialize<D>(deserializer: D) -> Result<ResourceVersion, D::Error> where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<ResourceVersion, D::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for ResourceVersion
impl Send for ResourceVersion
impl Sync for ResourceVersion
impl Unpin for ResourceVersion
impl UnwindSafe for ResourceVersion
Blanket Implementations
Mutably borrows from an owned value. Read more