pub struct GuestOptions {
pub features: Vec<String>,
pub options: Vec<String>,
pub rustc_flags: Vec<String>,
pub profile: Option<String>,
pub target_dir: Option<PathBuf>,
}
Expand description
Options defining how to embed a guest package.
Fields§
§features: Vec<String>
Features for cargo to build the guest with.
options: Vec<String>
Custom options to pass as args to cargo build
.
rustc_flags: Vec<String>
Configuration flags to build the guest with.
profile: Option<String>
Cargo profile
target_dir: Option<PathBuf>
Target directory
Implementations§
Source§impl GuestOptions
impl GuestOptions
Sourcepub fn with_options<S: AsRef<str>>(
self,
options: impl IntoIterator<Item = S>,
) -> Self
pub fn with_options<S: AsRef<str>>( self, options: impl IntoIterator<Item = S>, ) -> Self
Add custom options to pass to cargo build
.
Sourcepub fn with_features<S: AsRef<str>>(
self,
features: impl IntoIterator<Item = S>,
) -> Self
pub fn with_features<S: AsRef<str>>( self, features: impl IntoIterator<Item = S>, ) -> Self
Add package features to pass to cargo build
.
Sourcepub fn with_rustc_flags<S: AsRef<str>>(
self,
flags: impl IntoIterator<Item = S>,
) -> Self
pub fn with_rustc_flags<S: AsRef<str>>( self, flags: impl IntoIterator<Item = S>, ) -> Self
Add rustc flags for building the guest.
Sourcepub fn with_profile(self, profile: String) -> Self
pub fn with_profile(self, profile: String) -> Self
Set the cargo profile.
Sourcepub fn with_target_dir<P: AsRef<Path>>(self, target_dir: P) -> Self
pub fn with_target_dir<P: AsRef<Path>>(self, target_dir: P) -> Self
Set the target directory.
Trait Implementations§
Source§impl Clone for GuestOptions
impl Clone for GuestOptions
Source§fn clone(&self) -> GuestOptions
fn clone(&self) -> GuestOptions
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Default for GuestOptions
impl Default for GuestOptions
Source§fn default() -> GuestOptions
fn default() -> GuestOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for GuestOptions
impl RefUnwindSafe for GuestOptions
impl Send for GuestOptions
impl Sync for GuestOptions
impl Unpin for GuestOptions
impl UnwindSafe for GuestOptions
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)