pub enum VirtualPackage {
Win(Windows),
Unix,
Linux(Linux),
Osx(Osx),
LibC(LibC),
Cuda(Cuda),
Archspec(Archspec),
}Expand description
An enum that represents all virtual package types provided by this library.
Variants§
Win(Windows)
Available on windows
Unix
Available on Unix based platforms
Linux(Linux)
Available when running on Linux
Osx(Osx)
Available when running on OSX
LibC(LibC)
Available LibC family and version
Cuda(Cuda)
Available Cuda version
Archspec(Archspec)
The CPU architecture
Implementations§
Source§impl VirtualPackage
impl VirtualPackage
Sourcepub fn current() -> Result<Vec<Self>, DetectVirtualPackageError>
👎Deprecated since 1.1.0: Use VirtualPackage::detect(&VirtualPackageOverrides::default()) instead.
pub fn current() -> Result<Vec<Self>, DetectVirtualPackageError>
VirtualPackage::detect(&VirtualPackageOverrides::default()) instead.Returns virtual packages detected for the current system or an error if the versions could not be properly detected.
Sourcepub fn detect(
overrides: &VirtualPackageOverrides,
) -> Result<Vec<Self>, DetectVirtualPackageError>
pub fn detect( overrides: &VirtualPackageOverrides, ) -> Result<Vec<Self>, DetectVirtualPackageError>
Detect the virtual packages of the current system with the given overrides.
Trait Implementations§
Source§impl Clone for VirtualPackage
impl Clone for VirtualPackage
Source§fn clone(&self) -> VirtualPackage
fn clone(&self) -> VirtualPackage
Returns a copy 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 VirtualPackage
impl Debug for VirtualPackage
Source§impl From<Archspec> for VirtualPackage
impl From<Archspec> for VirtualPackage
Source§impl From<Cuda> for VirtualPackage
impl From<Cuda> for VirtualPackage
Source§impl From<LibC> for VirtualPackage
impl From<LibC> for VirtualPackage
Source§impl From<Linux> for VirtualPackage
impl From<Linux> for VirtualPackage
Source§impl From<Osx> for VirtualPackage
impl From<Osx> for VirtualPackage
Source§impl From<VirtualPackage> for GenericVirtualPackage
impl From<VirtualPackage> for GenericVirtualPackage
Source§fn from(package: VirtualPackage) -> Self
fn from(package: VirtualPackage) -> Self
Converts to this type from the input type.
Source§impl From<Windows> for VirtualPackage
impl From<Windows> for VirtualPackage
Source§impl Hash for VirtualPackage
impl Hash for VirtualPackage
Source§impl PartialEq for VirtualPackage
impl PartialEq for VirtualPackage
impl Eq for VirtualPackage
impl StructuralPartialEq for VirtualPackage
Auto Trait Implementations§
impl Freeze for VirtualPackage
impl RefUnwindSafe for VirtualPackage
impl Send for VirtualPackage
impl Sync for VirtualPackage
impl Unpin for VirtualPackage
impl UnwindSafe for VirtualPackage
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> 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§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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more