Struct caniuse_serde::Version
[−]
[src]
pub struct Version(_, _);
Version "3" and "3.0" are not considered equal; "3.0" is greater than "3". Opera and iOS Safari have hyphenation ranges of versions, eg "4.0-4.2". These are converted to a version matching the lower of the range, eg "4.0". Safari also has "TP" for its latest version, which is not stable across time and is converted to the VersionPart::TechnologyPreview, and Opera Mini just has "all"; it is effectively unversioned.
Methods
impl Version
[src]
fn opera_mini_all() -> Self
[src]
Special method to construct a version representing the Opera Mini all version
fn safari_technology_preview() -> Self
[src]
Special method to construct a version representing the Safari TP version
fn major(major_version: u64) -> Self
[src]
Special method to construct a Version that only represents a major version, eg 10
fn major_minor(major_version: u64, minor_version: u64) -> Self
[src]
Special method to construct a Version that represents a major-minor version, eg 12.1
fn major_minor_revision(
major_version: u64,
minor_version: u64,
revision_version: u64
) -> Self
[src]
major_version: u64,
minor_version: u64,
revision_version: u64
) -> Self
Special method to construct a Version that represents a major-minor-revision version, eg 4.5.6
fn is_safari_technology_preview(&self) -> bool
[src]
Is this version the Safari Technology Preview?
fn is_invalid_or_unknown(&self) -> bool
[src]
Is this version "0" (sometimes found in caniuse.com's Regional data) or Unknown
Trait Implementations
impl Debug for Version
[src]
impl Clone for Version
[src]
fn clone(&self) -> Version
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Ord for Version
[src]
fn cmp(&self, __arg_0: &Version) -> Ordering
[src]
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.22.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.22.0[src]
Compares and returns the minimum of two values. Read more
impl PartialOrd for Version
[src]
fn partial_cmp(&self, __arg_0: &Version) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &Version) -> bool
[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &Version) -> bool
[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &Version) -> bool
[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &Version) -> bool
[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Eq for Version
[src]
impl PartialEq for Version
[src]
fn eq(&self, __arg_0: &Version) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Version) -> bool
[src]
This method tests for !=
.
impl Hash for Version
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<'de> Deserialize<'de> for Version
[src]
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
[src]
Deserialize using Serde
impl<'a, I: Into<&'a str>> From<I> for Version
[src]
fn from(value: I) -> Self
[src]
Converts into a Version anything that can be converted into '&str'.
Use with into()
.