pub struct TestEnvBuilder<R> { /* private fields */ }Implementations§
Source§impl<R> TestEnvBuilder<R>
impl<R> TestEnvBuilder<R>
pub fn new() -> Self
Sourcepub fn add_package(self, pkg: Package) -> Self
pub fn add_package(self, pkg: Package) -> Self
Add a package to the repository generated by this TestEnvBuilder. The package will also be listed in the generated update package so that it will be downloaded as part of the OTA.
pub fn blobfs(self, client: ClientEnd<DirectoryMarker>) -> Self
Sourcepub fn repo_config(self, repo: RepositoryConfigs) -> Self
pub fn repo_config(self, repo: RepositoryConfigs) -> Self
Provide a TUF repository configuration to the package resolver. This will override the repository that the builder would otherwise generate.
Sourcepub fn omaha_state(self, state: OmahaState) -> Self
pub fn omaha_state(self, state: OmahaState) -> Self
Enable/disable Omaha. OmahaState::Auto will automatically set up an Omaha server and tell the updater to use it.
Sourcepub fn paver<F>(self, func: F) -> Self
pub fn paver<F>(self, func: F) -> Self
Mutate the MockPaverServiecBuilder used by this TestEnvBuilder.
pub fn test_executor(self, executor: Box<dyn TestExecutor<R>>) -> Self
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 zbi and optional vbmeta images to write.
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 zbi and optional vbmeta images to write to the recovery partition.
Sourcepub fn firmware_image(self, type_: String, content: Vec<u8>) -> Self
pub fn firmware_image(self, type_: String, content: Vec<u8>) -> Self
A firmware image to write.
Auto Trait Implementations§
impl<R> Freeze for TestEnvBuilder<R>
impl<R> !RefUnwindSafe for TestEnvBuilder<R>
impl<R> !Send for TestEnvBuilder<R>
impl<R> !Sync for TestEnvBuilder<R>
impl<R> Unpin for TestEnvBuilder<R>
impl<R> !UnwindSafe for TestEnvBuilder<R>
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
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
Converts the given service transport handle of type
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>
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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T, U> TryIntoExt<U> for Twhere
U: TryFromExt<T>,
impl<T, U> TryIntoExt<U> for Twhere
U: TryFromExt<T>,
type Error = <U as TryFromExt<T>>::Error
§fn try_into_ext(self) -> Result<U, <T as TryIntoExt<U>>::Error>
fn try_into_ext(self) -> Result<U, <T as TryIntoExt<U>>::Error>
Tries to perform the conversion.