Enum specifications::os::Os
source · pub enum Os {
Windows,
MacOS,
Linux,
}
Expand description
The Os enum defines possible operating systems that we know of and love
Variants§
Windows
Windows 95/98/2000/XP/Vista/7/8/10/11/w/e
MacOS
Apple’s operating system
Linux
Linux of any shape.
Implementations§
source§impl Os
impl Os
pub const HOST: Self = Self::Linux
sourcepub fn is_windows(&self) -> bool
pub fn is_windows(&self) -> bool
Returns if this operating system points to Windows.
§Returns
True if we’re Os::Windows
, or false otherwise.
sourcepub fn is_unix(&self) -> bool
pub fn is_unix(&self) -> bool
Returns if this operating system is Unix-compatible.
§Returns
True if we’re Os::MacOS
or Os::Linux
, false if we’re Os::Windows
.
sourcepub fn cfssl(&self) -> OsCfsslFormatter<'_>
pub fn cfssl(&self) -> OsCfsslFormatter<'_>
Trait Implementations§
source§impl<'de> Deserialize<'de> for Os
impl<'de> Deserialize<'de> for Os
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for Os
impl Eq for Os
impl StructuralPartialEq for Os
Auto Trait Implementations§
impl Freeze for Os
impl RefUnwindSafe for Os
impl Send for Os
impl Sync for Os
impl Unpin for Os
impl UnwindSafe for Os
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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.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.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request