pub struct Recipe { /* private fields */ }Expand description
One independent, validated native declaration document.
A Recipe retains the authored TOML rather than a rendered image. Reading and writing it never looks up fonts or prepares scientific layout.
Implementations§
Source§impl Recipe
impl Recipe
Sourcepub fn build_document(&self) -> Result<RecipeDocument, Error>
pub fn build_document(&self) -> Result<RecipeDocument, Error>
Restore the independent document using its declared default sources.
Sourcepub fn build_document_with<M>(
&self,
bindings: impl BindingArguments<M>,
) -> Result<RecipeDocument, Error>
pub fn build_document_with<M>( &self, bindings: impl BindingArguments<M>, ) -> Result<RecipeDocument, Error>
Restore an independent document, including a mixed document’s explicitly selected composition base and placement steps.
Sourcepub fn build_document_with_operation<M>(
&self,
bindings: impl BindingArguments<M>,
options: &OperationOptions,
) -> Result<RecipeDocument, Error>
pub fn build_document_with_operation<M>( &self, bindings: impl BindingArguments<M>, options: &OperationOptions, ) -> Result<RecipeDocument, Error>
Restore the independent document under one cancellable operation.
Sourcepub fn composition(&self) -> Result<CompositionPlan, Error>
pub fn composition(&self) -> Result<CompositionPlan, Error>
Restore the composition declaration using its default sources.
Sourcepub fn composition_with<M>(
&self,
bindings: impl BindingArguments<M>,
) -> Result<CompositionPlan, Error>
pub fn composition_with<M>( &self, bindings: impl BindingArguments<M>, ) -> Result<CompositionPlan, Error>
Restore the actual base and ordered placements with explicit inputs.
Sourcepub fn composition_with_operation<M>(
&self,
bindings: impl BindingArguments<M>,
options: &OperationOptions,
) -> Result<CompositionPlan, Error>
pub fn composition_with_operation<M>( &self, bindings: impl BindingArguments<M>, options: &OperationOptions, ) -> Result<CompositionPlan, Error>
Restore the composition’s own dependency closure under one operation.
Sourcepub fn placements(&self) -> Result<Vec<Placement>, Error>
pub fn placements(&self) -> Result<Vec<Placement>, Error>
Restore a single ordered placement list without adopting any base input.
Sourcepub fn placements_with<M>(
&self,
bindings: impl BindingArguments<M>,
) -> Result<Vec<Placement>, Error>
pub fn placements_with<M>( &self, bindings: impl BindingArguments<M>, ) -> Result<Vec<Placement>, Error>
Restore a placement list with explicit input replacements.
Sourcepub fn placements_with_operation<M>(
&self,
bindings: impl BindingArguments<M>,
options: &OperationOptions,
) -> Result<Vec<Placement>, Error>
pub fn placements_with_operation<M>( &self, bindings: impl BindingArguments<M>, options: &OperationOptions, ) -> Result<Vec<Placement>, Error>
Restore only the placement list’s dependencies under one operation.
Source§impl Recipe
impl Recipe
Sourcepub fn bindings(&self) -> &[BindingInfo]
pub fn bindings(&self) -> &[BindingInfo]
Ordered logical sources and their actual input requirements.
Sourcepub fn warnings(&self) -> &[RecipeWarning]
pub fn warnings(&self) -> &[RecipeWarning]
Current unresolved original selections without reading any data.
Sourcepub fn build(&self) -> Result<RecipeFigure, Error>
pub fn build(&self) -> Result<RecipeFigure, Error>
Restore the native figure from the declared default sources.
Sourcepub fn build_with<M>(
&self,
bindings: impl BindingArguments<M>,
) -> Result<RecipeFigure, Error>
pub fn build_with<M>( &self, bindings: impl BindingArguments<M>, ) -> Result<RecipeFigure, Error>
Restore from homogeneous inputs or a heterogeneous registry.
Sourcepub fn build_with_operation<M>(
&self,
bindings: impl BindingArguments<M>,
options: &OperationOptions,
) -> Result<RecipeFigure, Error>
pub fn build_with_operation<M>( &self, bindings: impl BindingArguments<M>, options: &OperationOptions, ) -> Result<RecipeFigure, Error>
Restore from the chosen inputs under a cancellable operation.
Sourcepub fn check(&self) -> Result<(), Error>
pub fn check(&self) -> Result<(), Error>
Check the declaration and its actual required input values.
Sourcepub fn check_with<M>(
&self,
bindings: impl BindingArguments<M>,
) -> Result<(), Error>
pub fn check_with<M>( &self, bindings: impl BindingArguments<M>, ) -> Result<(), Error>
Check using explicit in-memory replacements.
Sourcepub fn check_with_operation<M>(
&self,
bindings: impl BindingArguments<M>,
options: &OperationOptions,
) -> Result<(), Error>
pub fn check_with_operation<M>( &self, bindings: impl BindingArguments<M>, options: &OperationOptions, ) -> Result<(), Error>
Validate actual adopted inputs and font-independent scientific preparation.
Sourcepub fn add_binding(
&mut self,
name: &str,
source: impl BindingSourceInput,
) -> Result<(), Error>
pub fn add_binding( &mut self, name: &str, source: impl BindingSourceInput, ) -> Result<(), Error>
Declare an independent logical binding with an optional default.
Sourcepub fn set_binding_source(
&mut self,
name: &str,
source: impl BindingSourceInput,
) -> Result<(), Error>
pub fn set_binding_source( &mut self, name: &str, source: impl BindingSourceInput, ) -> Result<(), Error>
Replace the entire default without reading it.
Sourcepub fn rename_binding(&mut self, old: &str, new: &str) -> Result<(), Error>
pub fn rename_binding(&mut self, old: &str, new: &str) -> Result<(), Error>
Change one binding name and all of its actual references.
Sourcepub fn set_selector(
&mut self,
role: &str,
selector: impl Into<BindingSelector>,
) -> Result<(), Error>
pub fn set_selector( &mut self, role: &str, selector: impl Into<BindingSelector>, ) -> Result<(), Error>
Replace one role’s selection, keeping its source and other settings.
Source§impl Recipe
impl Recipe
Sourcepub fn set_output(
&mut self,
declaration: OutputDeclaration,
) -> Result<(), Error>
pub fn set_output( &mut self, declaration: OutputDeclaration, ) -> Result<(), Error>
Set an explicit output declaration, retaining the other action’s settings.
Sourcepub fn run(&self) -> Result<RunResult, Error>
pub fn run(&self) -> Result<RunResult, Error>
Execute the explicitly declared action using local default inputs.
Sourcepub fn run_with(&self, options: RunOptions<'_>) -> Result<RunResult, Error>
pub fn run_with(&self, options: RunOptions<'_>) -> Result<RunResult, Error>
Execute one action with optional call-local source and destination overrides.
Sourcepub fn run_with_operation(
&self,
options: RunOptions<'_>,
operation: &OperationOptions,
) -> Result<RunResult, Error>
pub fn run_with_operation( &self, options: RunOptions<'_>, operation: &OperationOptions, ) -> Result<RunResult, Error>
Execute the selected action under one cancellable operation.
Source§impl Recipe
impl Recipe
Sourcepub fn style(&self) -> Result<Recipe, Error>
pub fn style(&self) -> Result<Recipe, Error>
Project the declared visual scope without resolving observation bindings.
Sourcepub fn style_with_operation(
&self,
options: &OperationOptions,
) -> Result<Recipe, Error>
pub fn style_with_operation( &self, options: &OperationOptions, ) -> Result<Recipe, Error>
Project the visual scope under one cancellable operation.
Sourcepub fn style_in(&self, owner: impl Into<PanelPath>) -> Result<Recipe, Error>
pub fn style_in(&self, owner: impl Into<PanelPath>) -> Result<Recipe, Error>
Project one actual native grid panel’s style, including its effective inherited theme. The address may be its name or its original anchor.
Sourcepub fn style_in_with_operation(
&self,
owner: impl Into<PanelPath>,
options: &OperationOptions,
) -> Result<Recipe, Error>
pub fn style_in_with_operation( &self, owner: impl Into<PanelPath>, options: &OperationOptions, ) -> Result<Recipe, Error>
Project a selected visual owner under one cancellable operation.
Source§impl Recipe
impl Recipe
Sourcepub fn template_tasks() -> Vec<String>
pub fn template_tasks() -> Vec<String>
The current template tasks, including visual and document scopes.
Sourcepub fn template_modes(task: &str) -> Result<Vec<&'static str>, Error>
pub fn template_modes(task: &str) -> Result<Vec<&'static str>, Error>
Input modes of this task. An empty list indicates a document or visual task that does not take an input mode.
Source§impl Recipe
impl Recipe
Sourcepub fn read(path: impl AsRef<Path>) -> Result<Recipe, Error>
pub fn read(path: impl AsRef<Path>) -> Result<Recipe, Error>
Read a versioned recipe from a real local TOML file.
Sourcepub fn read_with_operation(
path: impl AsRef<Path>,
options: &OperationOptions,
) -> Result<Recipe, Error>
pub fn read_with_operation( path: impl AsRef<Path>, options: &OperationOptions, ) -> Result<Recipe, Error>
Read and validate declarations under one cancellable operation.
Sourcepub fn theme(&self) -> Result<Theme, Error>
pub fn theme(&self) -> Result<Theme, Error>
Restore the independent Theme declaration. No construction context or installed font can change the result.
Sourcepub fn write(&self, path: impl AsRef<Path>) -> Result<(), Error>
pub fn write(&self, path: impl AsRef<Path>) -> Result<(), Error>
Write this declaration to the supplied local TOML path atomically.
Sourcepub fn write_with_operation(
&self,
path: impl AsRef<Path>,
options: &OperationOptions,
) -> Result<(), Error>
pub fn write_with_operation( &self, path: impl AsRef<Path>, options: &OperationOptions, ) -> Result<(), Error>
Write a complete recipe under one cancellable operation.
Trait Implementations§
Source§impl<'a> From<&'a Recipe> for StyleSource<'a>
impl<'a> From<&'a Recipe> for StyleSource<'a>
Source§fn from(recipe: &'a Recipe) -> StyleSource<'a>
fn from(recipe: &'a Recipe) -> StyleSource<'a>
Auto Trait Implementations§
impl Forget for Recipe
impl Freeze for Recipewhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Item>: Freeze,
PhantomData<usize>: Freeze,
PhantomData<Bucket<Key, Item>>: Freeze,
PhantomData<BindingInfo>: Freeze,
PhantomData<RecipeWarning>: Freeze,
impl Move for Recipe
impl RefUnwindSafe for Recipe
impl Send for Recipe
impl Sync for Recipe
impl Unpin for Recipe
impl UnsafeUnpin for Recipewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Item>: UnsafeUnpin,
PhantomData<usize>: UnsafeUnpin,
PhantomData<Bucket<Key, Item>>: UnsafeUnpin,
PhantomData<BindingInfo>: UnsafeUnpin,
PhantomData<RecipeWarning>: UnsafeUnpin,
impl UnwindSafe for Recipewhere
RawVecInner: UnwindSafe,
NonNull<u8>: UnwindSafe,
Arc<[u8]>: UnwindSafe,
BoxRaw<RawKey>: UnwindSafe,
Arc<str>: UnwindSafe,
&'static str: UnwindSafe,
Blanket Implementations§
impl<T> Allocation for T
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> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.