pub struct WSLVersion(/* private fields */);Expand description
Represents a WSL version number.
This struct wraps the WSLVersion from the WSL Plugin API and provides
safe, idiomatic Rust access to its fields.
§Example
use wslplugins_rs::WSLVersion;
let version = WSLVersion::new(2, 0, 0);
assert_eq!(version.major(), 2);
assert_eq!(version.minor(), 0);
assert_eq!(version.revision(), 0);Implementations§
Trait Implementations§
Source§impl AsRef<WSLVersion> for WSLVersion
impl AsRef<WSLVersion> for WSLVersion
Source§fn as_ref(&self) -> &WSLVersion
fn as_ref(&self) -> &WSLVersion
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl AsRef<WSLVersion> for WSLVersion
impl AsRef<WSLVersion> for WSLVersion
Source§fn as_ref(&self) -> &WSLVersion
fn as_ref(&self) -> &WSLVersion
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Clone for WSLVersion
impl Clone for WSLVersion
Source§fn clone(&self) -> WSLVersion
fn clone(&self) -> WSLVersion
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WSLVersion
impl Debug for WSLVersion
Source§impl Default for WSLVersion
impl Default for WSLVersion
Source§impl Display for WSLVersion
impl Display for WSLVersion
Source§impl From<WSLVersion> for WSLVersion
impl From<WSLVersion> for WSLVersion
Source§fn from(value: WSLVersion) -> Self
fn from(value: WSLVersion) -> Self
Converts to this type from the input type.
Source§impl From<WSLVersion> for WSLVersion
impl From<WSLVersion> for WSLVersion
Source§fn from(value: WSLVersion) -> Self
fn from(value: WSLVersion) -> Self
Converts to this type from the input type.
Source§impl Hash for WSLVersion
impl Hash for WSLVersion
Source§impl Ord for WSLVersion
impl Ord for WSLVersion
Source§fn cmp(&self, other: &WSLVersion) -> Ordering
fn cmp(&self, other: &WSLVersion) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for WSLVersion
impl PartialEq for WSLVersion
Source§impl PartialOrd for WSLVersion
impl PartialOrd for WSLVersion
impl Eq for WSLVersion
impl StructuralPartialEq for WSLVersion
Auto Trait Implementations§
impl Freeze for WSLVersion
impl RefUnwindSafe for WSLVersion
impl Send for WSLVersion
impl Sync for WSLVersion
impl Unpin for WSLVersion
impl UnsafeUnpin for WSLVersion
impl UnwindSafe for WSLVersion
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more