pub struct ServerVersion {
pub major: u32,
pub minor: u32,
pub patch: u32,
pub raw: String,
}Expand description
A parsed server version.
Jellyfin reports things like 10.11.5, 10.11.5.0 and occasionally a
build suffix (10.11.5-rc1). Only the leading numeric components are
meaningful here; anything after them is preserved in raw for logging and
otherwise ignored.
Fields§
§major: u32§minor: u32§patch: u32§raw: StringImplementations§
Source§impl ServerVersion
impl ServerVersion
Sourcepub fn parse(raw: &str) -> Option<Self>
pub fn parse(raw: &str) -> Option<Self>
Parse what /System/Info/Public reported.
Returns None for anything without at least a numeric major, which is
treated as “unknown” rather than as an error — an unparseable version is
not a reason to refuse a server that may work perfectly well.
fn is_below_floor(&self) -> bool
Trait Implementations§
Source§impl Clone for ServerVersion
impl Clone for ServerVersion
Source§fn clone(&self) -> ServerVersion
fn clone(&self) -> ServerVersion
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ServerVersion
impl Debug for ServerVersion
Source§impl Display for ServerVersion
impl Display for ServerVersion
Source§impl PartialEq for ServerVersion
impl PartialEq for ServerVersion
Source§fn eq(&self, other: &ServerVersion) -> bool
fn eq(&self, other: &ServerVersion) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for ServerVersion
impl StructuralPartialEq for ServerVersion
Auto Trait Implementations§
impl Freeze for ServerVersion
impl RefUnwindSafe for ServerVersion
impl Send for ServerVersion
impl Sync for ServerVersion
impl Unpin for ServerVersion
impl UnsafeUnpin for ServerVersion
impl UnwindSafe for ServerVersion
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.