pub struct Version {
pub major: u32,
pub minor: u32,
pub patch: u32,
}Expand description
A Tailscale version.
Fields§
§major: u32§minor: u32§patch: u32Implementations§
Source§impl Version
impl Version
pub const fn new(major: u32, minor: u32, patch: u32) -> Self
Sourcepub const fn is_unstable(self) -> bool
pub const fn is_unstable(self) -> bool
Whether this is a development build.
Odd minor numbers are the unstable track. Such a build is newer than the stable release with the next even minor, so it is treated as such rather than warned about.
Sourcepub fn parse_cli_output(output: &str) -> Option<Self>
pub fn parse_cli_output(output: &str) -> Option<Self>
Read the version out of what tailscale version prints.
The first line is the client version; the remaining lines are the Go
toolchain and commit hashes, which are of no interest here. A build with
a suffix — 1.102.2-t01a2b3c4 — parses as its release.
Trait Implementations§
impl Copy for Version
impl Eq for Version
Source§impl Ord for Version
impl Ord for Version
1.21.0 (const: unstable) · 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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Version
impl PartialOrd for Version
impl StructuralPartialEq for Version
Auto Trait Implementations§
impl Freeze for Version
impl RefUnwindSafe for Version
impl Send for Version
impl Sync for Version
impl Unpin for Version
impl UnsafeUnpin for Version
impl UnwindSafe for Version
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.