pub struct Blob { /* private fields */ }
Expand description
A configuration blob builder for passing config information to UEFI.
Implementations§
Source§impl Blob
impl Blob
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new configuration blob with a placeholder StructureCount structure
Sourcepub fn add<T: BlobStructure>(&mut self, data: &T) -> &mut Self
pub fn add<T: BlobStructure>(&mut self, data: &T) -> &mut Self
Aligns and appends a sized structure and its appropriate header to the configuration blob.
Sourcepub fn add_cstring(
&mut self,
structure_type: BlobStructureType,
data: &[u8],
) -> &mut Self
pub fn add_cstring( &mut self, structure_type: BlobStructureType, data: &[u8], ) -> &mut Self
Aligns and appends a null terminated C string and its appropriate header to the configuration blob.
If the data is zero-sized, the configuration blob is not updated.
If the data does not include a null terminator (e.g: because the data was pulled from a Rust string), a null terminator is appended to the end of the data.
Sourcepub fn add_raw(
&mut self,
structure_type: BlobStructureType,
data: &[u8],
) -> &mut Self
pub fn add_raw( &mut self, structure_type: BlobStructureType, data: &[u8], ) -> &mut Self
Aligns and appends the raw byte data of a potentially dynamically sized structure and its appropriate header to the configuration blob.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Blob
impl RefUnwindSafe for Blob
impl Send for Blob
impl Sync for Blob
impl Unpin for Blob
impl UnwindSafe for Blob
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