[−][src]Struct nvpair::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]
Notable traits for NvListIter<'a>
impl<'a> Iterator for NvListIter<'a> type Item = &'a NvPair;
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]
&self,
name: S
) -> Result<Vec<NvList>>
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]
&mut self,
name: S,
data: &D
) -> Result<()>
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]
pub fn borrow_mut(&mut self) -> &mut NvListRef
[src]
impl Debug for NvListRef
[src]
impl ForeignTypeRef for NvListRef
[src]
type CType = nvlist
The raw C type.
pub unsafe fn from_ptr<'a>(ptr: *mut Self::CType) -> &'a Self
[src]
pub unsafe fn from_ptr_mut<'a>(ptr: *mut Self::CType) -> &'a mut Self
[src]
pub fn as_ptr(&self) -> *mut Self::CType
[src]
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?
pub fn into_iter(self) -> Self::IntoIter
[src]
impl NvEncode for NvListRef
[src]
pub fn insert_into<S: CStrArgument>(
&self,
name: S,
nv: &mut NvListRef
) -> Result<()>
[src]
&self,
name: S,
nv: &mut NvListRef
) -> Result<()>
Auto Trait Implementations
impl !RefUnwindSafe for NvListRef
[src]
impl !Send for NvListRef
[src]
impl !Sync for NvListRef
[src]
impl Unpin for NvListRef
[src]
impl UnwindSafe for NvListRef
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,