pub struct Nvml { /* private fields */ }Expand description
2026-09-26: An initialised NVML session over a function table.
nvmlShutdown runs on drop, balancing the successful init.
Implementations§
Source§impl Nvml
impl Nvml
Sourcepub fn open() -> Result<Self, NvmlUnavailable>
pub fn open() -> Result<Self, NvmlUnavailable>
2026-09-26: Open and initialise the system library.
Sourcepub fn with_fns(fns: NvmlFns) -> Result<Self, NvmlUnavailable>
pub fn with_fns(fns: NvmlFns) -> Result<Self, NvmlUnavailable>
2026-09-26: Initialise over a table whose functions stay valid for the life of the process. Tests use it.
Sourcepub fn device(&self, index: u32) -> Result<NvmlDevice<'_>, NvmlUnavailable>
pub fn device(&self, index: u32) -> Result<NvmlDevice<'_>, NvmlUnavailable>
2026-09-26: The device at NVML index index.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Nvml
impl RefUnwindSafe for Nvml
impl Send for Nvml
impl Sync for Nvml
impl Unpin for Nvml
impl UnwindSafe for Nvml
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