Struct smbioslib::UndefinedStructTable [−][src]
Undefined Struct Table
A collection of UndefinedStruct items.
Implementations
impl<'a> UndefinedStructTable
[src]
pub fn iter(&self) -> Iter<'_, UndefinedStruct>
[src]
Iterator of the contained UndefinedStruct items.
pub fn defined_struct_iter<T>(&'a self) -> impl Iterator<Item = T> + 'a where
T: SMBiosStruct<'a>,
[src]
T: SMBiosStruct<'a>,
An iterator over the defined type instances within the table.
pub fn all<T, F>(&'a self, f: F) -> bool where
T: SMBiosStruct<'a>,
F: FnMut(T) -> bool,
[src]
T: SMBiosStruct<'a>,
F: FnMut(T) -> bool,
Tests if every element of the defined struct iterator matches a predicate.
pub fn any<T, F>(&'a self, f: F) -> bool where
T: SMBiosStruct<'a>,
F: FnMut(T) -> bool,
[src]
T: SMBiosStruct<'a>,
F: FnMut(T) -> bool,
Tests if any element of the defined struct iterator matches a predicate.
pub fn first<T>(&'a self) -> Option<T> where
T: SMBiosStruct<'a>,
[src]
T: SMBiosStruct<'a>,
Finds the first occurance of the structure
pub fn find<T, P>(&'a self, predicate: P) -> Option<T> where
T: SMBiosStruct<'a>,
P: FnMut(&T) -> bool,
[src]
T: SMBiosStruct<'a>,
P: FnMut(&T) -> bool,
Finds the first occurance of the structure that satisfies a predicate.
pub fn find_map<A, B, F>(&'a self, f: F) -> Option<B> where
A: SMBiosStruct<'a>,
F: FnMut(A) -> Option<B>,
[src]
A: SMBiosStruct<'a>,
F: FnMut(A) -> Option<B>,
Applies function to the defined struct elements and returns the first non-none result.
pub fn filter<T: 'a, P: 'a>(
&'a self,
predicate: P
) -> impl Iterator<Item = T> + 'a where
T: SMBiosStruct<'a>,
P: FnMut(&T) -> bool,
[src]
&'a self,
predicate: P
) -> impl Iterator<Item = T> + 'a where
T: SMBiosStruct<'a>,
P: FnMut(&T) -> bool,
Creates an iterator of the defined structure which uses a closure to determine if an element should be yielded.
pub fn map<A: 'a, B, F: 'a>(&'a self, f: F) -> impl Iterator<Item = B> + 'a where
A: SMBiosStruct<'a>,
F: FnMut(A) -> B,
[src]
A: SMBiosStruct<'a>,
F: FnMut(A) -> B,
Maps the defined struct to another type given by the closure.
pub fn filter_map<A: 'a, B, F: 'a>(
&'a self,
f: F
) -> impl Iterator<Item = B> + 'a where
A: SMBiosStruct<'a>,
F: FnMut(A) -> Option<B>,
[src]
&'a self,
f: F
) -> impl Iterator<Item = B> + 'a where
A: SMBiosStruct<'a>,
F: FnMut(A) -> Option<B>,
Creates an iterator that both filters and maps from the defined struct iterator.
pub fn find_by_handle(&'a self, handle: &Handle) -> Option<&'a UndefinedStruct>
[src]
Finds the structure matching the given handle
To downcast to the defined struct, call .defined_struct() on the result.
pub fn collect<T>(&'a self) -> Vec<T>ⓘ where
T: SMBiosStruct<'a>,
[src]
T: SMBiosStruct<'a>,
Returns all occurances of the structure
pub fn try_load_from_file_offset(
file: &mut File,
table_offset: u64,
table_len: usize
) -> Result<Self, Error>
[src]
file: &mut File,
table_offset: u64,
table_len: usize
) -> Result<Self, Error>
Load an UndefinedStructTable by seeking and reading the file offsets.
Trait Implementations
impl Debug for UndefinedStructTable
[src]
impl From<Vec<u8, Global>> for UndefinedStructTable
[src]
impl IntoIterator for UndefinedStructTable
[src]
Auto Trait Implementations
impl RefUnwindSafe for UndefinedStructTable
impl Send for UndefinedStructTable
impl Sync for UndefinedStructTable
impl Unpin for UndefinedStructTable
impl UnwindSafe for UndefinedStructTable
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>,