[][src]Struct nvpair::NvList

#[repr(transparent)]pub struct NvList(_);

An NvList

Implementations

impl NvList[src]

pub fn try_new() -> Result<Self>[src]

Try to create a new NvList with no options.

Returns an error if memory allocation fails

pub fn try_new_unique_names() -> Result<Self>[src]

Try to create a new NvList with the NV_UNIQUE_NAME constraint

Returns an error if memory allocation fails

pub fn new() -> Self[src]

Create a new NvList with no options

Panics

  • if [try_new()] returns an error

pub fn new_unique_names() -> Self[src]

Create a new NvList with the NV_UNIQUE_NAME constraint

Panics

  • if [try_new_unique_names()] returns an error

pub fn try_clone(&self) -> Result<Self>[src]

Methods from Deref<Target = NvListRef>

pub fn as_mut_ptr(&mut self) -> *mut nvlist[src]

pub fn as_ptr(&self) -> *const nvlist[src]

pub fn encoded_size(&self, encoding: NvEncoding) -> Result<u64>[src]

pub fn is_empty(&self) -> bool[src]

pub fn add_boolean<S: CStrArgument>(&mut self, name: S) -> Result<()>[src]

pub fn first(&self) -> Option<&NvPair>[src]

pub fn iter(&self) -> NvListIter<'_>

Notable traits for NvListIter<'a>

impl<'a> Iterator for NvListIter<'a> type Item = &'a NvPair;
[src]

pub fn exists<S: CStrArgument>(&self, name: S) -> bool[src]

pub fn lookup<S: CStrArgument>(&self, name: S) -> Result<&NvPair>[src]

pub fn try_to_owned(&self) -> Result<NvList>[src]

pub fn lookup_nvlist<S: CStrArgument>(&self, name: S) -> Result<NvList>[src]

pub fn lookup_string<S: CStrArgument>(&self, name: S) -> Result<CString>[src]

pub fn lookup_uint64<S: CStrArgument>(&self, name: S) -> Result<u64>[src]

pub fn lookup_nvlist_array<S: CStrArgument>(
    &self,
    name: S
) -> Result<Vec<NvList>>
[src]

pub fn lookup_uint64_array<S: CStrArgument>(&self, name: S) -> Result<Vec<u64>>[src]

pub fn insert<S: CStrArgument, D: NvEncode + ?Sized>(
    &mut self,
    name: S,
    data: &D
) -> Result<()>
[src]

Trait Implementations

impl AsMut<NvListRef> for NvList[src]

impl AsRef<NvListRef> for NvList[src]

impl Borrow<NvListRef> for NvList[src]

impl BorrowMut<NvListRef> for NvList[src]

impl Clone for NvList[src]

impl Debug for NvList[src]

impl Default for NvList[src]

impl Deref for NvList[src]

type Target = NvListRef

The resulting type after dereferencing.

impl DerefMut for NvList[src]

impl Drop for NvList[src]

impl ForeignType for NvList[src]

type CType = nvlist

The raw C type.

type Ref = NvListRef

The type representing a reference to this type.

impl<'a> IntoIterator for &'a NvList[src]

type Item = &'a NvPair

The type of the elements being iterated over.

type IntoIter = NvListIter<'a>

Which kind of iterator are we turning this into?

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.