Struct simics_test::TestEnvSpec

source ·
pub struct TestEnvSpec {
    pub(crate) cargo_target_tmpdir: String,
    pub(crate) name: String,
    pub(crate) packages: HashSet<ProjectPackage>,
    pub(crate) nonrepo_packages: HashSet<ProjectPackage>,
    pub(crate) files: Vec<(String, Vec<u8>)>,
    pub(crate) directories: Vec<PathBuf>,
    pub(crate) simics_home: Option<PathBuf>,
    pub(crate) package_repo: Option<String>,
    pub(crate) install_all: bool,
    pub(crate) package_crates: Vec<PathBuf>,
    pub(crate) build_simics_version: Option<String>,
    pub(crate) run_simics_version: Option<String>,
}
Expand description

A specification for a test environment

Fields§

§cargo_target_tmpdir: String§name: String§packages: HashSet<ProjectPackage>§nonrepo_packages: HashSet<ProjectPackage>§files: Vec<(String, Vec<u8>)>§directories: Vec<PathBuf>§simics_home: Option<PathBuf>§package_repo: Option<String>§install_all: bool§package_crates: Vec<PathBuf>§build_simics_version: Option<String>§run_simics_version: Option<String>

Implementations§

source§

impl TestEnvSpec

source

pub fn builder() -> TestEnvSpecBuilder<((), (), (), (), (), (), (), (), (), (), (), ())>

Create a builder for building TestEnvSpec. On the builder, call .cargo_target_tmpdir(...), .name(...), .packages(...)(optional), .nonrepo_packages(...)(optional), .files(...)(optional), .directories(...)(optional), .simics_home(...)(optional), .package_repo(...)(optional), .install_all(...)(optional), .package_crates(...)(optional), .build_simics_version(...)(optional), .run_simics_version(...)(optional) to set the values of the fields. Finally, call .build() to create the instance of TestEnvSpec.

source§

impl TestEnvSpec

source

pub fn to_env(&self) -> Result<TestEnv>

Convert the specification for a test environment to a built test environment

Trait Implementations§

source§

impl Debug for TestEnvSpec

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more