pub struct UpdatePackageBuilder { /* private fields */ }Expand description
Like crate::PackageBuilder except it only makes update packages.
Implementations§
Source§impl UpdatePackageBuilder
impl UpdatePackageBuilder
Sourcepub fn new(images_package_repo: RepositoryUrl) -> Self
pub fn new(images_package_repo: RepositoryUrl) -> Self
Images, like the ZBI or firmware, are not stored in the update package, but in a separate package(s) referred to by the images manifest in the update package. For convenience, this builder takes images by their contents and creates the manifest and separate package, but to do so this builder must be given the URL of the repository that will serve the images package so that the update package’s manifest can reference it.
Sourcepub fn epoch(self, epoch: u64) -> Self
pub fn epoch(self, epoch: u64) -> Self
The update package’s epoch, used by the system-updater to prevent updating to an
incompatible build.
Defaults to crate::SOURCE_EPOCH if not set.
Sourcepub fn packages(self, packages: Vec<PinnedAbsolutePackageUrl>) -> Self
pub fn packages(self, packages: Vec<PinnedAbsolutePackageUrl>) -> Self
The additional packages (e.g. base and cache) to be resolved during the OTA.
Sourcepub fn fuchsia_image(self, zbi: Vec<u8>, vbmeta: Option<Vec<u8>>) -> Self
pub fn fuchsia_image(self, zbi: Vec<u8>, vbmeta: Option<Vec<u8>>) -> Self
The contents of the zbi and, if provided, vbmeta.
Sourcepub fn recovery_image(self, zbi: Vec<u8>, vbmeta: Option<Vec<u8>>) -> Self
pub fn recovery_image(self, zbi: Vec<u8>, vbmeta: Option<Vec<u8>>) -> Self
The contents of the zbi and, if provided, vbmeta, to write to the recovery slot.
Sourcepub fn images_package_name(self, name: PackageName) -> Self
pub fn images_package_name(self, name: PackageName) -> Self
The name of the package of images pointed to by the update package’s images manifest.
Defaults to update-images if not set.
Sourcepub fn firmware_images(self, images: BTreeMap<String, Vec<u8>>) -> Self
pub fn firmware_images(self, images: BTreeMap<String, Vec<u8>>) -> Self
Any additional firmware to write.
Sourcepub async fn build(self) -> (UpdatePackage, Package)
pub async fn build(self) -> (UpdatePackage, Package)
Returns the update package and the package of images referenced by the contained images manifest.
Auto Trait Implementations§
impl Freeze for UpdatePackageBuilder
impl RefUnwindSafe for UpdatePackageBuilder
impl Send for UpdatePackageBuilder
impl Sync for UpdatePackageBuilder
impl Unpin for UpdatePackageBuilder
impl UnwindSafe for UpdatePackageBuilder
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
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
T to [Self]§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoAny for T
impl<T> IntoAny for T
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>
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>
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