pub struct CompositionPlan { /* private fields */ }Expand description
An independent base snapshot and its ordered, repeatable composition steps.
The native base and native placements remain editable declarations in this
plan. No layout or image is prepared until Self::compose is called.
Implementations§
Source§impl CompositionPlan
impl CompositionPlan
Sourcepub fn new(
base: impl TryInto<CompositionSource, Error: Into<Error>>,
items: impl IntoIterator<Item = Placement>,
) -> Result<Self>
pub fn new( base: impl TryInto<CompositionSource, Error: Into<Error>>, items: impl IntoIterator<Item = Placement>, ) -> Result<Self>
Capture a base and the first ordered placement step.
Sourcepub fn with_options(
base: impl TryInto<CompositionSource, Error: Into<Error>>,
items: impl IntoIterator<Item = Placement>,
options: ComposeOptions,
) -> Result<Self>
pub fn with_options( base: impl TryInto<CompositionSource, Error: Into<Error>>, items: impl IntoIterator<Item = Placement>, options: ComposeOptions, ) -> Result<Self>
Capture the actual first step’s viewport policy.
Sourcepub fn with_operation(
base: impl TryInto<CompositionSource, Error: Into<Error>>,
items: impl IntoIterator<Item = Placement>,
options: ComposeOptions,
operation: &OperationOptions,
) -> Result<Self>
pub fn with_operation( base: impl TryInto<CompositionSource, Error: Into<Error>>, items: impl IntoIterator<Item = Placement>, options: ComposeOptions, operation: &OperationOptions, ) -> Result<Self>
Capture the base and placements under one cancellable operation.
Sourcepub fn then(self, items: impl IntoIterator<Item = Placement>) -> Result<Self>
pub fn then(self, items: impl IntoIterator<Item = Placement>) -> Result<Self>
Append another actual placement operation in the original base frame.
Sourcepub fn then_with_options(
self,
items: impl IntoIterator<Item = Placement>,
options: ComposeOptions,
) -> Result<Self>
pub fn then_with_options( self, items: impl IntoIterator<Item = Placement>, options: ComposeOptions, ) -> Result<Self>
Append one independent placement step with its own viewport policy.
Sourcepub fn then_with_operation(
self,
items: impl IntoIterator<Item = Placement>,
options: ComposeOptions,
operation: &OperationOptions,
) -> Result<Self>
pub fn then_with_operation( self, items: impl IntoIterator<Item = Placement>, options: ComposeOptions, operation: &OperationOptions, ) -> Result<Self>
Append a step under the caller’s cancellation options.
Sourcepub fn compose(&self) -> Result<Composite>
pub fn compose(&self) -> Result<Composite>
Prepare the actual native or fixed base and freeze the ordered steps.
Sourcepub fn compose_with_operation(
&self,
options: &OperationOptions,
) -> Result<Composite>
pub fn compose_with_operation( &self, options: &OperationOptions, ) -> Result<Composite>
Compose the complete plan under one operation.
Sourcepub fn get_recipe(&self) -> Result<Recipe>
pub fn get_recipe(&self) -> Result<Recipe>
Capture the complete plan without rendering its base or placements.
Sourcepub fn get_recipe_with_operation(
&self,
options: &OperationOptions,
) -> Result<Recipe>
pub fn get_recipe_with_operation( &self, options: &OperationOptions, ) -> Result<Recipe>
Capture a plan under one cancellable declaration operation.
Sourcepub fn recipe(&self, path: impl AsRef<Path>) -> Result<Recipe>
pub fn recipe(&self, path: impl AsRef<Path>) -> Result<Recipe>
Write the complete plan and return that same independent Recipe.
Sourcepub fn recipe_with_operation(
&self,
path: impl AsRef<Path>,
options: &OperationOptions,
) -> Result<Recipe>
pub fn recipe_with_operation( &self, path: impl AsRef<Path>, options: &OperationOptions, ) -> Result<Recipe>
Capture and atomically write the plan under one operation.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for CompositionPlan
impl !UnwindSafe for CompositionPlan
impl Forget for CompositionPlan
impl Freeze for CompositionPlanwhere
*const PlotDescription is !null: Freeze,
PhantomData<PlotDescription>: Freeze,
*const Canvas is !null: Freeze,
PhantomData<Canvas>: 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<Asset> is !null: Freeze,
PhantomData<ArcInner<Asset>>: Freeze,
*const ArcInner<PathBuf> is !null: Freeze,
PhantomData<ArcInner<PathBuf>>: Freeze,
*const ArcInner<RenderedScene> is !null: Freeze,
PhantomData<ArcInner<RenderedScene>>: Freeze,
*const ArcInner<SourceInfo> is !null: Freeze,
PhantomData<ArcInner<SourceInfo>>: Freeze,
*const ArcInner<Vec<PlanStep>> is !null: Freeze,
PhantomData<ArcInner<Vec<PlanStep>>>: Freeze,
impl Move for CompositionPlan
impl Send for CompositionPlan
impl Sync for CompositionPlan
impl Unpin for CompositionPlan
impl UnsafeUnpin for CompositionPlanwhere
*const PlotDescription is !null: UnsafeUnpin,
PhantomData<PlotDescription>: UnsafeUnpin,
*const Canvas is !null: UnsafeUnpin,
PhantomData<Canvas>: 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<Asset> is !null: UnsafeUnpin,
PhantomData<ArcInner<Asset>>: UnsafeUnpin,
*const ArcInner<PathBuf> is !null: UnsafeUnpin,
PhantomData<ArcInner<PathBuf>>: UnsafeUnpin,
*const ArcInner<RenderedScene> is !null: UnsafeUnpin,
PhantomData<ArcInner<RenderedScene>>: UnsafeUnpin,
*const ArcInner<SourceInfo> is !null: UnsafeUnpin,
PhantomData<ArcInner<SourceInfo>>: UnsafeUnpin,
*const ArcInner<Vec<PlanStep>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Vec<PlanStep>>>: UnsafeUnpin,
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
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.