pub struct Factory { /* private fields */ }Expand description
The stored boot page and drive-written regions of one OEM build.
Implementations§
Source§impl Factory
impl Factory
Sourcepub fn new(
boot_page: Arc<[u8]>,
regions: [Arc<[u8]>; 4],
) -> Result<Self, RebuildError>
pub fn new( boot_page: Arc<[u8]>, regions: [Arc<[u8]>; 4], ) -> Result<Self, RebuildError>
Assemble factory contents. boot_page must be layout::BOOT_PAGE
long and each region as long as its layout::DRIVE_WRITTEN entry.
Sourcepub fn from_image(image: &[u8]) -> Result<Self, RebuildError>
pub fn from_image(image: &[u8]) -> Result<Self, RebuildError>
Take the factory contents from an OEM update image. Fails on a wrong size or on a drive read, whose boot page is not in stored form.
Trait Implementations§
impl Eq for Factory
impl StructuralPartialEq for Factory
Auto Trait Implementations§
impl Freeze for Factory
impl RefUnwindSafe for Factory
impl Send for Factory
impl Sync for Factory
impl Unpin for Factory
impl UnsafeUnpin for Factory
impl UnwindSafe for Factory
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