Skip to main content

Recipe

Struct Recipe 

Source
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

Source

pub fn build_document(&self) -> Result<RecipeDocument>

Restore the independent document using its declared default sources.

Source

pub fn build_document_with<M>( &self, bindings: impl BindingArguments<M>, ) -> Result<RecipeDocument>

Restore an independent document, including a mixed document’s explicitly selected composition base and placement steps.

Source

pub fn build_document_with_operation<M>( &self, bindings: impl BindingArguments<M>, options: &OperationOptions, ) -> Result<RecipeDocument>

Restore the independent document under one cancellable operation.

Source

pub fn composition(&self) -> Result<CompositionPlan>

Restore the composition declaration using its default sources.

Source

pub fn composition_with<M>( &self, bindings: impl BindingArguments<M>, ) -> Result<CompositionPlan>

Restore the actual base and ordered placements with explicit inputs.

Source

pub fn composition_with_operation<M>( &self, bindings: impl BindingArguments<M>, options: &OperationOptions, ) -> Result<CompositionPlan>

Restore the composition’s own dependency closure under one operation.

Source

pub fn placements(&self) -> Result<Vec<Placement>>

Restore a single ordered placement list without adopting any base input.

Source

pub fn placements_with<M>( &self, bindings: impl BindingArguments<M>, ) -> Result<Vec<Placement>>

Restore a placement list with explicit input replacements.

Source

pub fn placements_with_operation<M>( &self, bindings: impl BindingArguments<M>, options: &OperationOptions, ) -> Result<Vec<Placement>>

Restore only the placement list’s dependencies under one operation.

Source§

impl Recipe

Source

pub fn bindings(&self) -> &[BindingInfo]

Ordered logical sources and their actual input requirements.

Source

pub fn warnings(&self) -> &[RecipeWarning]

Current unresolved original selections without reading any data.

Source

pub fn build(&self) -> Result<RecipeFigure>

Restore the native figure from the declared default sources.

Source

pub fn build_with<M>( &self, bindings: impl BindingArguments<M>, ) -> Result<RecipeFigure>

Restore from homogeneous inputs or a heterogeneous registry.

Source

pub fn build_with_operation<M>( &self, bindings: impl BindingArguments<M>, options: &OperationOptions, ) -> Result<RecipeFigure>

Restore from the chosen inputs under a cancellable operation.

Source

pub fn check(&self) -> Result<()>

Check the declaration and its actual required input values.

Source

pub fn check_with<M>(&self, bindings: impl BindingArguments<M>) -> Result<()>

Check using explicit in-memory replacements.

Source

pub fn check_with_operation<M>( &self, bindings: impl BindingArguments<M>, options: &OperationOptions, ) -> Result<()>

Validate actual adopted inputs and font-independent scientific preparation.

Source

pub fn add_binding( &mut self, name: &str, source: impl BindingSourceInput, ) -> Result<()>

Declare an independent logical binding with an optional default.

Source

pub fn set_binding_source( &mut self, name: &str, source: impl BindingSourceInput, ) -> Result<()>

Replace the entire default without reading it.

Source

pub fn rename_binding(&mut self, old: &str, new: &str) -> Result<()>

Change one binding name and all of its actual references.

Source

pub fn set_selector( &mut self, role: &str, selector: impl Into<BindingSelector>, ) -> Result<()>

Replace one role’s selection, keeping its source and other settings.

Source§

impl Recipe

Source

pub fn set_output(&mut self, declaration: OutputDeclaration) -> Result<()>

Set an explicit output declaration, retaining the other action’s settings.

Source

pub fn run(&self) -> Result<RunResult>

Execute the explicitly declared action using local default inputs.

Source

pub fn run_with(&self, options: RunOptions<'_>) -> Result<RunResult>

Execute one action with optional call-local source and destination overrides.

Source

pub fn run_with_operation( &self, options: RunOptions<'_>, operation: &OperationOptions, ) -> Result<RunResult>

Execute the selected action under one cancellable operation.

Source§

impl Recipe

Source

pub fn schema() -> String

Generate the machine-readable schema for the current native Recipe grammar. Additional source, reference and scientific constraints are enforced by the ordinary declaration reader and check operation.

Source§

impl Recipe

Source

pub fn style(&self) -> Result<Self>

Project the declared visual scope without resolving observation bindings.

Source

pub fn style_with_operation(&self, options: &OperationOptions) -> Result<Self>

Project the visual scope under one cancellable operation.

Source

pub fn style_in(&self, owner: impl Into<PanelPath>) -> Result<Self>

Project one actual native grid panel’s style, including its effective inherited theme. The address may be its name or its original anchor.

Source

pub fn style_in_with_operation( &self, owner: impl Into<PanelPath>, options: &OperationOptions, ) -> Result<Self>

Project a selected visual owner under one cancellable operation.

Source§

impl Recipe

Source

pub fn template_tasks() -> Vec<String>

The current template tasks, including visual and document scopes.

Source

pub fn template_modes(task: &str) -> Result<Vec<&'static str>>

Input modes of this task. An empty list indicates a document or visual task that does not take an input mode.

Source

pub fn template(task: &str) -> Result<String>

Generate commented TOML for a current native task. If the task has distinct input modes, choose one with Self::template_for.

Source

pub fn template_for(task: &str, mode: &str) -> Result<String>

Generate a template for the explicitly selected native input mode.

Source§

impl Recipe

Source

pub fn read(path: impl AsRef<Path>) -> Result<Self>

Read a versioned recipe from a real local TOML file.

Source

pub fn read_with_operation( path: impl AsRef<Path>, options: &OperationOptions, ) -> Result<Self>

Read and validate declarations under one cancellable operation.

Source

pub fn theme(&self) -> Result<Theme>

Restore the independent Theme declaration. No construction context or installed font can change the result.

Source

pub fn write(&self, path: impl AsRef<Path>) -> Result<()>

Write this declaration to the supplied local TOML path atomically.

Source

pub fn write_with_operation( &self, path: impl AsRef<Path>, options: &OperationOptions, ) -> Result<()>

Write a complete recipe under one cancellable operation.

Trait Implementations§

Source§

impl Clone for Recipe

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Recipe

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a> From<&'a Recipe> for StyleSource<'a>

Source§

fn from(recipe: &'a Recipe) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V