pub struct Runnable {
pub program: String,
pub args: Vec<String>,
pub cwd: Utf8PathBuf,
pub kind: RunnableKind,
}Expand description
A template-like structure for describing runnables.
These are used for running and debugging binaries and tests without encoding build system-specific knowledge into rust-analyzer.
§Example
Below is an example of a test runnable. {label} and {test_id}
are explained in Runnable::args’s documentation.
{
"program": "buck",
"args": [
"test",
"{label}",
"--",
"{test_id}",
"--print-passing-details"
],
"cwd": "/home/user/repo-root/",
"kind": "testOne"
}Fields§
§program: StringThe program invoked by the runnable.
For example, this might be cargo, buck, or bazel.
args: Vec<String>The arguments passed to Runnable::program.
The args can contain two template strings: {label} and {test_id}.
rust-analyzer will find and replace {label} with Build::label and
{test_id} with the test name.
cwd: Utf8PathBufThe current working directory of the runnable.
kind: RunnableKindTrait Implementations§
Source§impl From<RunnableData> for Runnable
impl From<RunnableData> for Runnable
Source§fn from(data: RunnableData) -> Self
fn from(data: RunnableData) -> Self
Converts to this type from the input type.
impl Eq for Runnable
impl StructuralPartialEq for Runnable
Auto Trait Implementations§
impl Freeze for Runnable
impl RefUnwindSafe for Runnable
impl Send for Runnable
impl Sync for Runnable
impl Unpin for Runnable
impl UnwindSafe for Runnable
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§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