Struct nvml_wrapper::NvmlBuilder
source · [−]pub struct NvmlBuilder<'a> { /* private fields */ }Expand description
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
Trait Implementations
sourceimpl<'a> Clone for NvmlBuilder<'a>
impl<'a> Clone for NvmlBuilder<'a>
sourcefn clone(&self) -> NvmlBuilder<'a>
fn clone(&self) -> NvmlBuilder<'a>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl<'a> Debug for NvmlBuilder<'a>
impl<'a> Debug for NvmlBuilder<'a>
sourceimpl<'a> Default for NvmlBuilder<'a>
impl<'a> Default for NvmlBuilder<'a>
sourcefn default() -> NvmlBuilder<'a>
fn default() -> NvmlBuilder<'a>
Returns the “default value” for a type. Read more
sourceimpl<'a> PartialEq<NvmlBuilder<'a>> for NvmlBuilder<'a>
impl<'a> PartialEq<NvmlBuilder<'a>> for NvmlBuilder<'a>
sourcefn eq(&self, other: &NvmlBuilder<'a>) -> bool
fn eq(&self, other: &NvmlBuilder<'a>) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &NvmlBuilder<'a>) -> bool
fn ne(&self, other: &NvmlBuilder<'a>) -> bool
This method tests for !=.
impl<'a> Eq for NvmlBuilder<'a>
impl<'a> StructuralEq for NvmlBuilder<'a>
impl<'a> StructuralPartialEq for NvmlBuilder<'a>
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more