pub struct Builder<'a, T = (), V = BubbleSortValidator>where
V: MemoryReservationValidator,{ /* private fields */ }
Expand description
The FDT builder.
Uses the default BubbleSortValidator
validator of the quadratic time
complexity to validate memory reservations. That is suitable for
the small number of memory reservations (say, up until ~8).
Consider implementing your own validator if you expect a larger number
of memory reservations.
Implementations§
Source§impl<'a, V> Builder<'a, (), V>where
V: MemoryReservationValidator,
impl<'a, V> Builder<'a, (), V>where
V: MemoryReservationValidator,
Source§impl<'a, T> Builder<'a, Nest<T>>
impl<'a, T> Builder<'a, Nest<T>>
Sourcepub fn add_null(self, name: StringId) -> Result<Self, Error>
pub fn add_null(self, name: StringId) -> Result<Self, Error>
Adds a property that does not have a value.
Sourcepub fn add_u64_array(self, name: StringId, data: &[u64]) -> Result<Self, Error>
pub fn add_u64_array(self, name: StringId, data: &[u64]) -> Result<Self, Error>
Adds an array of u64 properties. Useful for reg
or ranges
.
Sourcepub fn add_u64_list(
self,
name: StringId,
data: impl IntoIterator<Item = u64>,
) -> Result<Self, Error>
pub fn add_u64_list( self, name: StringId, data: impl IntoIterator<Item = u64>, ) -> Result<Self, Error>
Adds a list of u64 properties. Useful for reg
or ranges
.
Sourcepub fn add_u32_array(self, name: StringId, data: &[u32]) -> Result<Self, Error>
pub fn add_u32_array(self, name: StringId, data: &[u32]) -> Result<Self, Error>
Adds an array of u32 properties.
Sourcepub fn add_prop_array(
self,
name: StringId,
data_array: &[&[u8]],
) -> Result<Self, Error>
pub fn add_prop_array( self, name: StringId, data_array: &[&[u8]], ) -> Result<Self, Error>
Adds an array of properties. The caller must ensure these are Big Endian slices.
Sourcepub fn add_str(self, name: StringId, data: &str) -> Result<Self, Error>
pub fn add_str(self, name: StringId, data: &str) -> Result<Self, Error>
Adds a string property.
Auto Trait Implementations§
impl<'a, T, V> Freeze for Builder<'a, T, V>
impl<'a, T, V> RefUnwindSafe for Builder<'a, T, V>where
V: RefUnwindSafe,
impl<'a, T, V> Send for Builder<'a, T, V>where
V: Send,
impl<'a, T, V> Sync for Builder<'a, T, V>where
V: Sync,
impl<'a, T, V> Unpin for Builder<'a, T, V>where
V: Unpin,
impl<'a, T = (), V = BubbleSortValidator> !UnwindSafe for Builder<'a, T, V>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more