pub struct FxBlobBuilder { /* private fields */ }Expand description
Builder used to construct a new Fxblob instance ready for flashing to a device.
Implementations§
Source§impl FxBlobBuilder
impl FxBlobBuilder
Sourcepub async fn new(device: DeviceHolder) -> Result<Self, Error>
pub async fn new(device: DeviceHolder) -> Result<Self, Error>
Creates a new FxBlobBuilder backed by the given device.
Sourcepub async fn finalize(self) -> Result<(DeviceHolder, u64), Error>
pub async fn finalize(self) -> Result<(DeviceHolder, u64), Error>
Finalizes building the FxBlob instance this builder represents. The filesystem will not be usable unless this is called. Returns the filesystem’s DeviceHolder and the last offset in bytes which was used on the device.
Sourcepub async fn install_blob(
&self,
blob: &BlobToInstall,
) -> Result<DataObjectHandle<ObjectStore>, Error>
pub async fn install_blob( &self, blob: &BlobToInstall, ) -> Result<DataObjectHandle<ObjectStore>, Error>
Installs the given blob into the filesystem, returning a handle to the new object.
Sourcepub fn generate_blob(
&self,
data: Vec<u8>,
compression_algorithm: Option<CompressionAlgorithm>,
) -> Result<BlobToInstall, Error>
pub fn generate_blob( &self, data: Vec<u8>, compression_algorithm: Option<CompressionAlgorithm>, ) -> Result<BlobToInstall, Error>
Helper function to quickly create a blob to install from in-memory data. Mainly for testing.
Auto Trait Implementations§
impl !Freeze for FxBlobBuilder
impl !RefUnwindSafe for FxBlobBuilder
impl Send for FxBlobBuilder
impl Sync for FxBlobBuilder
impl Unpin for FxBlobBuilder
impl UnsafeUnpin for FxBlobBuilder
impl !UnwindSafe for FxBlobBuilder
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
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more