pub struct Registry { /* private fields */ }Expand description
Task registry with deterministic listing and collision errors.
Implementations§
Source§impl Registry
impl Registry
pub fn new() -> Self
Sourcepub fn discover() -> Result<Self>
pub fn discover() -> Result<Self>
Discover task functions registered by #[bake::task] in this executable
and its linked dependencies. Nested Rust modules become task namespaces.
A dependency that contributes tasks must be referenced by the executable
(for example, use bake_releases as _;) so the linker includes it.
pub fn register(&mut self, task: Task) -> Result<&mut Self>
Sourcepub fn replace(&mut self, name: &str, task: Task) -> Result<&mut Self>
pub fn replace(&mut self, name: &str, task: Task) -> Result<&mut Self>
Replace an existing task explicitly, most often the default output task.
pub fn include(&mut self, namespace: &str, other: Registry) -> Result<&mut Self>
pub fn tasks(&self) -> impl Iterator<Item = &Task>
Sourcepub fn context(self, root: impl Into<PathBuf>) -> Context
pub fn context(self, root: impl Into<PathBuf>) -> Context
Create an isolated execution context with this registry and a project root.
pub fn help(&self, name: Option<&str>) -> Result<String>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Registry
impl RefUnwindSafe for Registry
impl Send for Registry
impl Sync for Registry
impl Unpin for Registry
impl UnsafeUnpin for Registry
impl UnwindSafe for Registry
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