[][src]Struct nvpair::NvListRef

pub struct NvListRef(_);

A borrowed reference to a NvList.

Implementations

impl NvListRef[src]

pub unsafe fn from_mut_ptr<'a>(v: *mut nvlist) -> &'a mut Self[src]

Safety

Must be passed a valid, non-null nvlist pointer that is mutable, with a lifetime of at least 'a

pub unsafe fn from_ptr<'a>(v: *const nvlist) -> &'a Self[src]

Safety

Must be passed a valid, non-null nvlist pointer with a lifetime of at least 'a.

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 Debug for NvListRef[src]

impl ForeignTypeRef for NvListRef[src]

type CType = nvlist

The raw C type.

impl<'a> IntoIterator for &'a NvListRef[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?

impl NvEncode for NvListRef[src]

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, 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.