pub struct RustCrate { /* private fields */ }Expand description
Implementations§
Source§impl RustCrate
impl RustCrate
Sourcepub fn new(src: impl Into<PathBuf>, workspace_root: impl Into<PathBuf>) -> Self
pub fn new(src: impl Into<PathBuf>, workspace_root: impl Into<PathBuf>) -> Self
Creates a new RustCrate.
The src argument is the path to the package’s directory.
The crate_root argument is a path to the package’s workspace root, which may
be a parent of src in a multi-crate workspace.
Sourcepub fn bin(self, bin: impl Into<String>) -> Self
pub fn bin(self, bin: impl Into<String>) -> Self
Sets the target to be a binary with the given name,
equivalent to cargo run --bin <name>.
Sourcepub fn example(self, example: impl Into<String>) -> Self
pub fn example(self, example: impl Into<String>) -> Self
Sets the target to be an example with the given name,
equivalent to cargo run --example <name>.
Sourcepub fn profile(self, profile: impl Into<String>) -> Self
pub fn profile(self, profile: impl Into<String>) -> Self
Sets the profile to be used when building the crate.
Equivalent to cargo run --profile <profile>.
pub fn rustflags(self, rustflags: impl Into<String>) -> Self
pub fn target_dir(self, target_dir: impl Into<PathBuf>) -> Self
pub fn build_env(self, key: impl Into<String>, value: impl Into<String>) -> Self
Sourcepub fn dylib_package(self, dylib_package: impl Into<String>) -> Self
pub fn dylib_package(self, dylib_package: impl Into<String>) -> Self
Marks this crate as a generated trybuild dylib-examples crate whose examples link
dynamically against the trybuild dylib with cargo package name dylib_package.
pub fn no_default_features(self) -> Self
pub fn features( self, features: impl IntoIterator<Item = impl Into<String>>, ) -> Self
pub fn config(self, config: impl Into<String>) -> Self
pub fn tracing(self, perf: impl Into<TracingOptions>) -> Self
Sourcepub fn args(self, args: impl IntoIterator<Item = impl Into<String>>) -> Self
pub fn args(self, args: impl IntoIterator<Item = impl Into<String>>) -> Self
Sets the arguments to be passed to the binary when it is launched.
Sourcepub fn display_name(self, display_name: impl Into<String>) -> Self
pub fn display_name(self, display_name: impl Into<String>) -> Self
Sets the display name for this service, which will be used in logging.
Sourcepub fn env(self, key: impl Into<String>, value: impl Into<String>) -> Self
pub fn env(self, key: impl Into<String>, value: impl Into<String>) -> Self
Sets an environment variable to be written to a .env file on the launched instance.
pub fn pin_to_core(self, core: usize) -> Self
pub fn get_build_params(&self, target: HostTargetType) -> BuildParams
Trait Implementations§
Auto Trait Implementations§
impl Forget for RustCrate
impl Freeze for RustCrate
impl Move for RustCrate
impl RefUnwindSafe for RustCratewhere
String: RefUnwindSafe,
impl Send for RustCrate
impl Sync for RustCrate
impl Unpin for RustCrate
impl UnsafeUnpin for RustCratewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<(String, String)>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
&'static str: UnsafeUnpin,
String: UnsafeUnpin,
impl UnwindSafe for RustCratewhere
RawVecInner: UnwindSafe,
&'static str: UnwindSafe,
String: UnwindSafe,
HashMap<String, String>: UnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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> ToSinkBuild for T
impl<T> ToSinkBuild for T
§fn iter_to_sink_build(self) -> SendIterBuild<Self>
fn iter_to_sink_build(self) -> SendIterBuild<Self>
§fn stream_to_sink_build(self) -> SendStreamBuild<Self>where
Self: Sized + Stream,
fn stream_to_sink_build(self) -> SendStreamBuild<Self>where
Self: Sized + Stream,
SinkBuild] adaptor chain to send all items from self as a [Stream].