pub struct Recipe<'src, D = Dependency<'src>> {Show 13 fields
pub attributes: BTreeSet<Attribute<'src>>,
pub body: Vec<Line<'src>>,
pub dependencies: Vec<D>,
pub doc: Option<String>,
pub file_depth: u32,
pub import_offsets: Vec<usize>,
pub name: Name<'src>,
pub namepath: Namepath<'src>,
pub parameters: Vec<Parameter<'src>>,
pub priors: usize,
pub private: bool,
pub quiet: bool,
pub shebang: bool,
}
Expand description
A recipe, e.g. foo: bar baz
Fieldsยง
ยงattributes: BTreeSet<Attribute<'src>>
ยงbody: Vec<Line<'src>>
ยงdependencies: Vec<D>
ยงdoc: Option<String>
ยงfile_depth: u32
ยงimport_offsets: Vec<usize>
ยงname: Name<'src>
ยงnamepath: Namepath<'src>
ยงparameters: Vec<Parameter<'src>>
ยงpriors: usize
ยงprivate: bool
ยงquiet: bool
ยงshebang: bool
Implementationsยง
Sourceยงimpl<'src, D> Recipe<'src, D>
impl<'src, D> Recipe<'src, D>
pub fn argument_range(&self) -> RangeInclusive<usize> โ
pub fn min_arguments(&self) -> usize
pub fn max_arguments(&self) -> usize
pub fn name(&self) -> &'src str
pub fn line_number(&self) -> usize
pub fn confirm(&self) -> RunResult<'src, bool>
pub fn check_can_be_default_recipe(&self) -> RunResult<'src, ()>
pub fn is_public(&self) -> bool
pub fn is_script(&self) -> bool
pub fn takes_positional_arguments(&self, settings: &Settings<'_>) -> bool
pub fn change_directory(&self) -> bool
pub fn enabled(&self) -> bool
pub fn run<'run>( &self, context: &ExecutionContext<'src, 'run>, scope: &Scope<'src, 'run>, positional: &[String], is_dependency: bool, ) -> RunResult<'src, ()>
pub fn run_script<'run>( &self, context: &ExecutionContext<'src, 'run>, scope: &Scope<'src, 'run>, positional: &[String], config: &Config, evaluator: Evaluator<'src, 'run>, ) -> RunResult<'src, ()>
pub fn groups(&self) -> BTreeSet<String>
pub fn doc(&self) -> Option<&str>
pub fn subsequents(&self) -> impl Iterator<Item = &D>
Trait Implementationsยง
Sourceยงimpl<'src, D: Display> ColorDisplay for Recipe<'src, D>
impl<'src, D: Display> ColorDisplay for Recipe<'src, D>
impl<'src, D> StructuralPartialEq for Recipe<'src, D>
Auto Trait Implementationsยง
impl<'src, D> Freeze for Recipe<'src, D>
impl<'src, D> RefUnwindSafe for Recipe<'src, D>where
D: RefUnwindSafe,
impl<'src, D> Send for Recipe<'src, D>where
D: Send,
impl<'src, D> Sync for Recipe<'src, D>where
D: Sync,
impl<'src, D> Unpin for Recipe<'src, D>where
D: Unpin,
impl<'src, D> UnwindSafe for Recipe<'src, D>where
D: 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
Mutably borrows from an owned value. Read more