Skip to main content

Module backend

Module backend 

Source
Expand description

The vendor backend abstraction — nvtop’s struct gpu_vendor vtable, translated to Rust.

Contract:

  • init() failing is normal (driver/library absent) — the registry drops the backend silently and the rest of the tool keeps working.
  • Per-metric absence is None in the sample, never an Err. Err from a refresh means “this refresh produced nothing usable” (device fell off the bus, etc.) and is survivable.

Enums§

BackendError

Traits§

GpuBackend

Functions§

all_backends
Explicit registry — no constructor/inventory magic. Each backend’s failed init is logged and skipped.