pub struct Instruction {
pub parts: Vec<InstructionPart>,
pub paths: BTreeMap<ArtifactName, String>,
}Expand description
An instruction split into its text and the Artifacts its @{artf …} slots name, with the
path of each named Artifact where it is known.
Fields§
§parts: Vec<InstructionPart>§paths: BTreeMap<ArtifactName, String>Implementations§
Source§impl Instruction
impl Instruction
Sourcepub fn text(text: String) -> Self
pub fn text(text: String) -> Self
Plain text that names no Artifact, such as a runtime eval’s command.
Sourcepub fn declared(config: &RepoConfig, eval: &Eval) -> Self
pub fn declared(config: &RepoConfig, eval: &Eval) -> Self
A declared eval’s instruction, each slot where its declaration put it, and the paths of the Artifacts it names as their declarations write them.
Sourcepub fn saved<'a>(
text: &str,
named: impl IntoIterator<Item = &'a ArtifactName>,
path: impl Fn(&ArtifactName) -> Option<String>,
) -> Self
pub fn saved<'a>( text: &str, named: impl IntoIterator<Item = &'a ArtifactName>, path: impl Fn(&ArtifactName) -> Option<String>, ) -> Self
An instruction as a request saved it: the text its slots filled with the names of the
Artifacts they named, and those Artifacts (named). The slots’ places are not saved, so
each place where one of those names stands as a whole word, not inside a path or a
file name, is taken as its slot. path gives a named Artifact’s path where it is known.
Trait Implementations§
Source§impl Clone for Instruction
impl Clone for Instruction
Source§impl Debug for Instruction
impl Debug for Instruction
Source§impl Default for Instruction
impl Default for Instruction
impl Eq for Instruction
Source§impl PartialEq for Instruction
impl PartialEq for Instruction
impl StructuralPartialEq for Instruction
Auto Trait Implementations§
impl Forget for Instruction
impl Freeze for Instructionwhere
*const u8 is !null: Freeze,
PhantomData<InstructionPart>: Freeze,
*const LeafNode<ArtifactName, String> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(ArtifactName, String)>>: Freeze,
impl Move for Instruction
impl RefUnwindSafe for Instruction
impl Send for Instructionwhere
RawVecInner: Send,
NodeRef<Owned, ArtifactName, String, LeafOrInternal>: Send,
BoxRaw<(ArtifactName, String)>: Send,
impl Sync for Instructionwhere
RawVecInner: Sync,
NodeRef<Owned, ArtifactName, String, LeafOrInternal>: Sync,
BoxRaw<(ArtifactName, String)>: Sync,
impl Unpin for Instruction
impl UnsafeUnpin for Instructionwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<InstructionPart>: UnsafeUnpin,
*const LeafNode<ArtifactName, String> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(ArtifactName, String)>>: UnsafeUnpin,
impl UnwindSafe for Instruction
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,
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.