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§
source§impl<'a> NvmlBuilder<'a>
impl<'a> NvmlBuilder<'a>
Trait Implementations§
source§impl<'a> Clone for NvmlBuilder<'a>
impl<'a> Clone for NvmlBuilder<'a>
source§fn clone(&self) -> NvmlBuilder<'a>
fn clone(&self) -> NvmlBuilder<'a>
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<'a> Debug for NvmlBuilder<'a>
impl<'a> Debug for NvmlBuilder<'a>
source§impl<'a> Default for NvmlBuilder<'a>
impl<'a> Default for NvmlBuilder<'a>
source§fn default() -> NvmlBuilder<'a>
fn default() -> NvmlBuilder<'a>
Returns the “default value” for a type. Read more
source§impl<'a> PartialEq for NvmlBuilder<'a>
impl<'a> PartialEq for NvmlBuilder<'a>
source§fn 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 ==
.impl<'a> Eq 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§
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