Skip to main content

RecipeFigure

Enum RecipeFigure 

Source
#[non_exhaustive]
pub enum RecipeFigure {
Show 27 variants Scatter(Plot<Scatter>), Histogram(Plot<Histogram>), Density(Plot<Density>), Qq(Plot<Qq>), PointInterval(Plot<PointInterval>), Line(Plot<Line>), Trajectory(Plot<Trajectory>), LinePath(Plot<LinePath>), Interaction(Plot<Interaction>), Coefficient(Plot<Coefficient>), Forest(Plot<Forest>), Dumbbell(Plot<Dumbbell>), Heatmap(Plot<Heatmap>), Bar(Plot<Bar>), HorizontalBar(Plot<HorizontalBar>), StackedBar(Plot<StackedBar>), StackedHorizontalBar(Plot<StackedHorizontalBar>), Boxplot(Plot<Boxplot>), Violin(Plot<Violin>), Raincloud(Plot<Raincloud>), Regression(Plot<Regression>), Marginal(Plot<Marginal>), Matrix(Plot<Matrix>), Beeswarm(Plot<Beeswarm>), Waterfall(Plot<Waterfall>), Canvas(Canvas), Theme(Box<Theme>),
}
Expand description

A rebuilt, editable native figure retains its exact family.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Scatter(Plot<Scatter>)

A native scatter plot.

§

Histogram(Plot<Histogram>)

A native histogram plot.

§

Density(Plot<Density>)

A native density plot.

§

Qq(Plot<Qq>)

A native qq plot.

§

PointInterval(Plot<PointInterval>)

A native point_interval plot.

§

Line(Plot<Line>)

A native line plot.

§

Trajectory(Plot<Trajectory>)

A native trajectory plot.

§

LinePath(Plot<LinePath>)

A native line_path plot.

§

Interaction(Plot<Interaction>)

A native interaction plot.

§

Coefficient(Plot<Coefficient>)

A native coefficient plot.

§

Forest(Plot<Forest>)

A native forest plot.

§

Dumbbell(Plot<Dumbbell>)

A native dumbbell plot.

§

Heatmap(Plot<Heatmap>)

A native heatmap plot.

§

Bar(Plot<Bar>)

A native bar plot.

§

HorizontalBar(Plot<HorizontalBar>)

A native horizontal_bar plot.

§

StackedBar(Plot<StackedBar>)

A native stacked_bar plot.

§

StackedHorizontalBar(Plot<StackedHorizontalBar>)

A native stacked_horizontal_bar plot.

§

Boxplot(Plot<Boxplot>)

A native boxplot plot.

§

Violin(Plot<Violin>)

A native violin plot.

§

Raincloud(Plot<Raincloud>)

A native raincloud plot.

§

Regression(Plot<Regression>)

A native regression plot.

§

Marginal(Plot<Marginal>)

A native marginal plot.

§

Matrix(Plot<Matrix>)

A native matrix plot.

§

Beeswarm(Plot<Beeswarm>)

A native beeswarm plot.

§

Waterfall(Plot<Waterfall>)

A native waterfall plot.

§

Canvas(Canvas)

A rebuilt editable Canvas grid.

§

Theme(Box<Theme>)

An independent complete theme declaration.

Implementations§

Source§

impl RecipeFigure

Source

pub fn compose( &self, items: impl IntoIterator<Item = Placement>, ) -> Result<Composite, Error>

Compose independently prepared items on this base.

Source

pub fn compose_with_options( &self, items: impl IntoIterator<Item = Placement>, options: ComposeOptions, ) -> Result<Composite, Error>

Compose using an explicit viewport policy.

Source

pub fn compose_with_operation( &self, items: impl IntoIterator<Item = Placement>, options: ComposeOptions, operation: &OperationOptions, ) -> Result<Composite, Error>

Compose with this call’s cancellation and viewport policy.

Source§

impl RecipeFigure

Source

pub fn save_with( &self, path: impl AsRef<Path>, format: impl Into<Format>, ) -> Result<Output, Error>

Publish one complete image atomically, according to the selected device. The returned Output is the complete immutable scene.

Source

pub fn save_with_operation( &self, path: impl AsRef<Path>, format: impl Into<Format>, options: &OperationOptions, ) -> Result<Output, Error>

Publish a file under one operation, from preparation through install.

Source

pub fn encode(&self, format: impl Into<Format>) -> Result<Arc<[u8]>, Error>

Encode a complete device artifact in immutable owned memory.

Source

pub fn encode_with_operation( &self, format: impl Into<Format>, options: &OperationOptions, ) -> Result<Arc<[u8]>, Error>

Encode in memory under this call’s operation options.

Source

pub fn write_to( &self, writer: &mut dyn Write, format: impl Into<Format>, ) -> Result<Output, Error>

Write one complete artifact at the writer’s current position. A failed external write may report a confirmed prefix.

Source

pub fn write_to_with_operation( &self, writer: &mut dyn Write, format: impl Into<Format>, options: &OperationOptions, ) -> Result<Output, Error>

Write to a borrowed stream under one operation.

Source

pub fn pixels(&self) -> Result<PixelBuffer, Error>

Read source-sized, straight RGBA8 samples of the complete scene.

Source

pub fn pixels_with_options( &self, options: PixelOptions, ) -> Result<PixelBuffer, Error>

Read immutable samples with explicit sampling and representation.

Source

pub fn pixels_with_options_with_operation( &self, options: PixelOptions, operation_options: &OperationOptions, ) -> Result<PixelBuffer, Error>

Read immutable samples using this call’s operation options.

Source

pub fn pixels_into(&self, target: PixelTarget<'_>) -> Result<(), Error>

Fill the actual logical pixels of a caller-owned buffer.

Source

pub fn pixels_into_with_options( &self, target: PixelTarget<'_>, options: PixelOptions, ) -> Result<(), Error>

Fill a caller-owned target using the requested pixel options.

Source

pub fn pixels_into_with_options_with_operation( &self, target: PixelTarget<'_>, options: PixelOptions, operation_options: &OperationOptions, ) -> Result<(), Error>

Fill a caller-owned target in one cancellable operation.

Source§

impl RecipeFigure

Source

pub const fn kind(&self) -> Option<PlotKind>

Inspect the actual plot family, if this declaration is a plot.

Source

pub fn preflight(&self) -> Result<(), Error>

Validate the complete rebuilt figure.

Source

pub fn preflight_with_operation( &self, options: &OperationOptions, ) -> Result<(), Error>

Perform this operation using the caller’s cancellation options.

Source

pub fn layout_report(&self) -> Result<LayoutReport, Error>

Read the accepted native layout.

Source

pub fn layout_report_with_operation( &self, options: &OperationOptions, ) -> Result<LayoutReport, Error>

Perform this operation using the caller’s cancellation options.

Source

pub fn render_with_results(&self) -> Result<RenderWithResults, Error>

Freeze the figure with its same-operation scientific results.

Source

pub fn render_with_results_with_operation( &self, options: &OperationOptions, ) -> Result<RenderWithResults, Error>

Perform this operation using the caller’s cancellation options.

Source

pub fn get_recipe(&self) -> Result<Recipe, Error>

Extract the current editable declaration.

Source

pub fn get_recipe_with_operation( &self, options: &OperationOptions, ) -> Result<Recipe, Error>

Perform this operation using the caller’s cancellation options.

Source

pub fn render(&self) -> Result<Output, Error>

Freeze the rebuilt figure in a native Output.

Source

pub fn render_with_operation( &self, options: &OperationOptions, ) -> Result<Output, Error>

Prepare and freeze under one cancellable operation.

Source

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

Publish outlined SVG.

Source

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

Publish with the caller’s cancellation options.

Source

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

Publish SVG retaining selectable text.

Source

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

Publish with the caller’s cancellation options.

Source

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

Publish the default balanced PNG.

Source

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

Publish with the caller’s cancellation options.

Source

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

Publish a source-sized PNG.

Source

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

Publish with the caller’s cancellation options.

Source

pub fn png_with_options( &self, path: impl AsRef<Path>, options: PngOptions, ) -> Result<Output, Error>

Publish a PNG with explicit device options.

Source

pub fn png_with_options_with_operation( &self, path: impl AsRef<Path>, options: PngOptions, operation: &OperationOptions, ) -> Result<Output, Error>

Publish a PNG with explicit sampling and operation options.

Source

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

Write the current native declaration and return that same Recipe.

Source

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

Extract and write the declaration under one operation.

Trait Implementations§

Source§

impl Clone for RecipeFigure

Source§

fn clone(&self) -> RecipeFigure

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 TryFrom<&RecipeFigure> for CompositionSource

Source§

type Error = Error

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

fn try_from(figure: &RecipeFigure) -> Result<CompositionSource, Error>

Performs the conversion.

Auto Trait Implementations§

§

impl !RefUnwindSafe for RecipeFigure

§

impl !UnwindSafe for RecipeFigure

§

impl Forget for RecipeFigure

§

impl Freeze for RecipeFigure
where *const ArcInner<()> is !null: Freeze, PhantomData<ArcInner<()>>: Freeze, *const ArcInner<String> is !null: Freeze, PhantomData<ArcInner<String>>: Freeze, *const ArcInner<Vec<FontFamily>> is !null: Freeze, PhantomData<ArcInner<Vec<FontFamily>>>: Freeze, *const ArcInner<TextInstructions> is !null: Freeze, PhantomData<ArcInner<TextInstructions>>: Freeze, *const ArcInner<SharedPayload> is !null: Freeze, PhantomData<ArcInner<SharedPayload>>: Freeze, PhantomData<Scatter>: Freeze, PhantomData<Histogram>: Freeze, PhantomData<Density>: Freeze, PhantomData<Qq>: Freeze, PhantomData<PointInterval>: Freeze, PhantomData<Line>: Freeze, PhantomData<Trajectory>: Freeze, PhantomData<LinePath>: Freeze, PhantomData<Interaction>: Freeze, PhantomData<Coefficient>: Freeze, PhantomData<Forest>: Freeze, PhantomData<Dumbbell>: Freeze, PhantomData<Heatmap>: Freeze, PhantomData<Bar>: Freeze, PhantomData<HorizontalBar>: Freeze, PhantomData<StackedBar>: Freeze, PhantomData<StackedHorizontalBar>: Freeze, PhantomData<Boxplot>: Freeze, PhantomData<Violin>: Freeze, PhantomData<Raincloud>: Freeze, PhantomData<Regression>: Freeze, PhantomData<Marginal>: Freeze, PhantomData<Matrix>: Freeze, PhantomData<Beeswarm>: Freeze, PhantomData<Waterfall>: Freeze, *const ArcInner<Placements> is !null: Freeze, PhantomData<ArcInner<Placements>>: Freeze, *const ArcInner<Vec<Placement>> is !null: Freeze, PhantomData<ArcInner<Vec<Placement>>>: Freeze, *const ArcInner<Theme> is !null: Freeze, PhantomData<ArcInner<Theme>>: Freeze, *const ArcInner<BTreeMap<String, String>> is !null: Freeze, PhantomData<ArcInner<BTreeMap<String, String>>>: Freeze, *const ArcInner<HashMap<RawKey, BTreeMap<String, String>>> is !null: Freeze, PhantomData<ArcInner<HashMap<RawKey, BTreeMap<String, String>>>>: Freeze, *const ArcInner<BTreeMap<String, CapturedLabel>> is !null: Freeze, PhantomData<ArcInner<BTreeMap<String, CapturedLabel>>>: Freeze, *const ArcInner<BTreeMap<(usize, usize), String>> is !null: Freeze, PhantomData<ArcInner<BTreeMap<(usize, usize), String>>>: Freeze, *const ArcInner<[String]> is !null: Freeze, PhantomData<ArcInner<[String]>>: Freeze, *const ArcInner<GridRowLabels> is !null: Freeze, PhantomData<ArcInner<GridRowLabels>>: Freeze, *const u8 is !null: Freeze, PhantomData<CanvasHeader>: Freeze, PhantomData<Vec<usize>>: Freeze, *const Theme is !null: Freeze, PhantomData<Theme>: Freeze,

§

impl Move for RecipeFigure

§

impl Send for RecipeFigure
where Arc<()>: Send, Arc<String>: Send, Arc<Vec<FontFamily>>: Send, Arc<TextInstructions>: Send, Arc<SharedPayload>: Send, Arc<Placements>: Send, Arc<Vec<Placement>>: Send, Arc<Theme>: Send, Arc<BTreeMap<String, String>>: Send, Arc<HashMap<RawKey, BTreeMap<String, String>>>: Send, Arc<BTreeMap<String, CapturedLabel>>: Send, Arc<BTreeMap<(usize, usize), String>>: Send, Arc<[String]>: Send, Arc<GridRowLabels>: Send, RawVecInner: Send, BoxRaw<Theme>: Send,

§

impl Sync for RecipeFigure
where Arc<()>: Sync, Arc<String>: Sync, Arc<Vec<FontFamily>>: Sync, Arc<TextInstructions>: Sync, Arc<SharedPayload>: Sync, Arc<Placements>: Sync, Arc<Vec<Placement>>: Sync, Arc<Theme>: Sync, Arc<BTreeMap<String, String>>: Sync, Arc<HashMap<RawKey, BTreeMap<String, String>>>: Sync, Arc<BTreeMap<String, CapturedLabel>>: Sync, Arc<BTreeMap<(usize, usize), String>>: Sync, Arc<[String]>: Sync, Arc<GridRowLabels>: Sync, RawVecInner: Sync, BoxRaw<Theme>: Sync,

§

impl Unpin for RecipeFigure
where Arc<()>: Unpin, Arc<String>: Unpin, Arc<Vec<FontFamily>>: Unpin, Arc<TextInstructions>: Unpin, Arc<SharedPayload>: Unpin, Arc<Placements>: Unpin, Arc<Vec<Placement>>: Unpin, Arc<Theme>: Unpin, Arc<BTreeMap<String, String>>: Unpin, Arc<HashMap<RawKey, BTreeMap<String, String>>>: Unpin, Arc<BTreeMap<String, CapturedLabel>>: Unpin, Arc<BTreeMap<(usize, usize), String>>: Unpin, Arc<[String]>: Unpin, Arc<GridRowLabels>: Unpin, *const u8 is !null: Unpin, Box<Theme>: Unpin,

§

impl UnsafeUnpin for RecipeFigure
where *const ArcInner<()> is !null: UnsafeUnpin, PhantomData<ArcInner<()>>: UnsafeUnpin, *const ArcInner<String> is !null: UnsafeUnpin, PhantomData<ArcInner<String>>: UnsafeUnpin, *const ArcInner<Vec<FontFamily>> is !null: UnsafeUnpin, PhantomData<ArcInner<Vec<FontFamily>>>: UnsafeUnpin, *const ArcInner<TextInstructions> is !null: UnsafeUnpin, PhantomData<ArcInner<TextInstructions>>: UnsafeUnpin, *const ArcInner<SharedPayload> is !null: UnsafeUnpin, PhantomData<ArcInner<SharedPayload>>: UnsafeUnpin, PhantomData<Scatter>: UnsafeUnpin, PhantomData<Histogram>: UnsafeUnpin, PhantomData<Density>: UnsafeUnpin, PhantomData<Qq>: UnsafeUnpin, PhantomData<PointInterval>: UnsafeUnpin, PhantomData<Line>: UnsafeUnpin, PhantomData<Trajectory>: UnsafeUnpin, PhantomData<LinePath>: UnsafeUnpin, PhantomData<Interaction>: UnsafeUnpin, PhantomData<Coefficient>: UnsafeUnpin, PhantomData<Forest>: UnsafeUnpin, PhantomData<Dumbbell>: UnsafeUnpin, PhantomData<Heatmap>: UnsafeUnpin, PhantomData<Bar>: UnsafeUnpin, PhantomData<HorizontalBar>: UnsafeUnpin, PhantomData<StackedBar>: UnsafeUnpin, PhantomData<StackedHorizontalBar>: UnsafeUnpin, PhantomData<Boxplot>: UnsafeUnpin, PhantomData<Violin>: UnsafeUnpin, PhantomData<Raincloud>: UnsafeUnpin, PhantomData<Regression>: UnsafeUnpin, PhantomData<Marginal>: UnsafeUnpin, PhantomData<Matrix>: UnsafeUnpin, PhantomData<Beeswarm>: UnsafeUnpin, PhantomData<Waterfall>: UnsafeUnpin, *const ArcInner<Placements> is !null: UnsafeUnpin, PhantomData<ArcInner<Placements>>: UnsafeUnpin, *const ArcInner<Vec<Placement>> is !null: UnsafeUnpin, PhantomData<ArcInner<Vec<Placement>>>: UnsafeUnpin, *const ArcInner<Theme> is !null: UnsafeUnpin, PhantomData<ArcInner<Theme>>: UnsafeUnpin, *const ArcInner<BTreeMap<String, String>> is !null: UnsafeUnpin, PhantomData<ArcInner<BTreeMap<String, String>>>: UnsafeUnpin, *const ArcInner<HashMap<RawKey, BTreeMap<String, String>>> is !null: UnsafeUnpin, PhantomData<ArcInner<HashMap<RawKey, BTreeMap<String, String>>>>: UnsafeUnpin, *const ArcInner<BTreeMap<String, CapturedLabel>> is !null: UnsafeUnpin, PhantomData<ArcInner<BTreeMap<String, CapturedLabel>>>: UnsafeUnpin, *const ArcInner<BTreeMap<(usize, usize), String>> is !null: UnsafeUnpin, PhantomData<ArcInner<BTreeMap<(usize, usize), String>>>: UnsafeUnpin, *const ArcInner<[String]> is !null: UnsafeUnpin, PhantomData<ArcInner<[String]>>: UnsafeUnpin, *const ArcInner<GridRowLabels> is !null: UnsafeUnpin, PhantomData<ArcInner<GridRowLabels>>: UnsafeUnpin, *const u8 is !null: UnsafeUnpin, PhantomData<CanvasHeader>: UnsafeUnpin, PhantomData<Vec<usize>>: UnsafeUnpin, *const Theme is !null: UnsafeUnpin, PhantomData<Theme>: UnsafeUnpin,

Blanket Implementations§

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