Expand description
Idiomatic Rust representation of illumos nvlists.
This crate converts raw nvlist_t pointers (from libnvpair) into
pure Rust types with no raw pointers or FFI in the public API.
§Example
ⓘ
use illumos_nvpair::{NvList, NvValue};
// Given a raw nvlist pointer from some illumos API:
let nvl = unsafe { NvList::from_raw(raw_ptr) }?;
if let Some(NvValue::String(s)) = nvl.lookup("name") {
println!("name = {s}");
}Structs§
- NvList
- An ordered list of name-value pairs, converted from an illumos nvlist.
- Owned
NvList - Owning RAII handle to a live
nvlist_tallocated by libnvpair (or by any illumos API that returns annvlist_t *with caller-frees-it semantics).