pub struct CommandPlan {
pub description: String,
pub commands: Vec<CommandSpec>,
}Fields§
§description: String§commands: Vec<CommandSpec>Implementations§
Source§impl CommandPlan
impl CommandPlan
Sourcepub fn provide_target_environment_secret(
&mut self,
target: &TargetTemplate,
name: &str,
value: &str,
) -> Result<(), Error>
pub fn provide_target_environment_secret( &mut self, target: &TargetTemplate, name: &str, value: &str, ) -> Result<(), Error>
Supply one container environment value without placing it in the Podman/SSH argument vector. The target launcher reads the value from stdin, exports it, and asks the container engine to inherit it by name.
pub fn execute( &self, executor: &impl CommandExecutor, ) -> Result<Vec<CommandOutput>, Error>
Sourcepub fn execute_concurrent(
&self,
executor: &(impl CommandExecutor + Sync),
) -> Result<Vec<CommandOutput>, Error>
pub fn execute_concurrent( &self, executor: &(impl CommandExecutor + Sync), ) -> Result<Vec<CommandOutput>, Error>
Execute the plan the same way Self::execute does, except that
commands sharing a CommandSpec::parallel_group marker and
appearing consecutively in commands run concurrently as one batch.
A batch starts only once every earlier command has succeeded, and a
batch that fails reports the first failure in plan order regardless
of which command finished first — the same fail-fast contract
Self::execute provides between individual commands. This method
requires a Sync executor because a batch shares it across threads;
Self::execute keeps working with non-Sync executors such as
test fakes built on RefCell.
Sourcepub fn split_at_target_creation(&self) -> Option<(CommandPlan, CommandPlan)>
pub fn split_at_target_creation(&self) -> Option<(CommandPlan, CommandPlan)>
Split the plan around the command that creates the session’s target: the commands through that one, then the commands that run against a target which already exists.
A plan that creates nothing — an existing project directory, say — splits into nothing, so a caller never arms a teardown for a target it did not bring into existence.
Trait Implementations§
Source§impl Clone for CommandPlan
impl Clone for CommandPlan
Source§fn clone(&self) -> CommandPlan
fn clone(&self) -> CommandPlan
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CommandPlan
impl Debug for CommandPlan
Source§impl<'de> Deserialize<'de> for CommandPlan
impl<'de> Deserialize<'de> for CommandPlan
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CommandPlan, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CommandPlan, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for CommandPlan
Source§impl PartialEq for CommandPlan
impl PartialEq for CommandPlan
Source§impl Serialize for CommandPlan
impl Serialize for CommandPlan
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for CommandPlan
Auto Trait Implementations§
impl Freeze for CommandPlan
impl RefUnwindSafe for CommandPlan
impl Send for CommandPlan
impl Sync for CommandPlan
impl Unpin for CommandPlan
impl UnsafeUnpin for CommandPlan
impl UnwindSafe for CommandPlan
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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> ⓘ
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> ⓘ
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