pub struct NextAction {
pub argv: Vec<String>,
pub prerequisites: Option<Vec<String>>,
pub purpose: Option<String>,
pub destructive: bool,
}Expand description
A structured next action: an argv array (never a shell string) with
prerequisites and purpose.
Fields§
§argv: Vec<String>Argument array as the caller would pass it to jubarte. The first
entry is the program name.
prerequisites: Option<Vec<String>>Optional human-readable prerequisites (e.g. source file readable).
purpose: Option<String>Human-readable purpose.
destructive: boolThe action erases another author’s markup. Omitted when it does not.
Implementations§
Source§impl NextAction
impl NextAction
Sourcepub fn new(argv: Vec<String>) -> NextAction
pub fn new(argv: Vec<String>) -> NextAction
Build a next action from a structured argv array.
Sourcepub fn with_destructive(self) -> NextAction
pub fn with_destructive(self) -> NextAction
Mark the action as erasing another author’s markup.
Sourcepub fn with_purpose(self, purpose: impl Into<String>) -> NextAction
pub fn with_purpose(self, purpose: impl Into<String>) -> NextAction
Set the purpose string.
Sourcepub fn with_prerequisites(self, prerequisites: Vec<String>) -> NextAction
pub fn with_prerequisites(self, prerequisites: Vec<String>) -> NextAction
Set the prerequisites list.
Trait Implementations§
Source§impl Clone for NextAction
impl Clone for NextAction
Source§fn clone(&self) -> NextAction
fn clone(&self) -> NextAction
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NextAction
impl Debug for NextAction
Source§impl<'de> Deserialize<'de> for NextAction
impl<'de> Deserialize<'de> for NextAction
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<NextAction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<NextAction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for NextAction
Source§impl PartialEq for NextAction
impl PartialEq for NextAction
Source§impl Serialize for NextAction
impl Serialize for NextAction
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,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for NextAction
Auto Trait Implementations§
impl Forget for NextAction
impl Freeze for NextAction
impl Move for NextAction
impl RefUnwindSafe for NextAction
impl Send for NextAction
impl Sync for NextAction
impl Unpin for NextAction
impl UnsafeUnpin for NextAction
impl UnwindSafe for NextAction
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
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
Compare self to
key and return true if they are equal.