[−][src]Struct nvml_wrapper::NvmlBuilder
A builder struct that provides further flexibility in how NVML is initialized.
Examples
Initialize NVML with a non-default name for the shared object file:
use nvml_wrapper::NVML; use std::ffi::OsStr; let init_result = NVML::builder().lib_path(OsStr::new("libnvidia-ml-other-name.so")).init();
Initialize NVML with a non-default path to the shared object file:
use nvml_wrapper::NVML; use std::ffi::OsStr; let init_result = NVML::builder().lib_path(OsStr::new("/some/path/to/libnvidia-ml.so")).init();
Implementations
impl<'a> NvmlBuilder<'a>[src]
pub fn lib_path(&mut self, path: &'a OsStr) -> &mut Self[src]
Set the path to the NVML lib file.
See libloading's docs for details about how this lib path is
handled.
pub fn flags(&mut self, flags: InitFlags) -> &mut Self[src]
Set the InitFlags to initialize NVML with.
pub fn init(&self) -> Result<NVML, NvmlError>[src]
Perform initialization.
Trait Implementations
impl<'a> Clone for NvmlBuilder<'a>[src]
pub fn clone(&self) -> NvmlBuilder<'a>[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl<'a> Debug for NvmlBuilder<'a>[src]
impl<'a> Default for NvmlBuilder<'a>[src]
pub fn default() -> NvmlBuilder<'a>[src]
impl<'a> Eq for NvmlBuilder<'a>[src]
impl<'a> PartialEq<NvmlBuilder<'a>> for NvmlBuilder<'a>[src]
pub fn eq(&self, other: &NvmlBuilder<'a>) -> bool[src]
pub fn ne(&self, other: &NvmlBuilder<'a>) -> bool[src]
impl<'a> StructuralEq for NvmlBuilder<'a>[src]
impl<'a> StructuralPartialEq for NvmlBuilder<'a>[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for NvmlBuilder<'a>
impl<'a> Send for NvmlBuilder<'a>
impl<'a> Sync for NvmlBuilder<'a>
impl<'a> Unpin for NvmlBuilder<'a>
impl<'a> UnwindSafe for NvmlBuilder<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,