pub struct Composition {
pub id: CompositionId,
pub nodes: Vec<CompositionNode>,
pub output: Option<NodeId>,
pub inputs: Vec<String>,
pub controls: Vec<CompositionControl>,
}Expand description
An acyclic graph of image operations with one selected output.
Fields§
§id: CompositionIdStable composition identity.
nodes: Vec<CompositionNode>The graph’s nodes. Order has no meaning; a node may name a later node as its input.
output: Option<NodeId>The node whose image is the composition’s picture. A composition without one saves but cannot be rendered.
inputs: Vec<String>The images a group node gives it, by name, in port order; its NodeOp::GroupInput
nodes read them.
controls: Vec<CompositionControl>The node settings a group node may set, by name.
Implementations§
Source§impl Composition
impl Composition
Sourcepub const fn new(id: CompositionId) -> Self
pub const fn new(id: CompositionId) -> Self
Creates an empty composition with no output.
Sourcepub fn node(&self, id: &NodeId) -> Option<&CompositionNode>
pub fn node(&self, id: &NodeId) -> Option<&CompositionNode>
The node named id.
Trait Implementations§
Source§impl Clone for Composition
impl Clone for Composition
Source§impl Debug for Composition
impl Debug for Composition
Source§impl<'de> Deserialize<'de> for Composition
impl<'de> Deserialize<'de> for Composition
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for Composition
impl PartialEq for Composition
Source§impl Serialize for Composition
impl Serialize for Composition
impl StructuralPartialEq for Composition
Auto Trait Implementations§
impl Forget for Composition
impl Freeze for Compositionwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<CompositionNode>: Freeze,
PhantomData<String>: Freeze,
PhantomData<CompositionControl>: Freeze,
impl Move for Composition
impl RefUnwindSafe for Composition
impl Send for Compositionwhere
RawVecInner: Send,
BoxRaw<DataBinding>: Send,
BoxRaw<MotionPath>: Send,
BoxRaw<TextStyle>: Send,
BoxRaw<LayoutNode>: Send,
NodeRef<Owned, String, Animated<EffectValue>, LeafOrInternal>: Send,
BoxRaw<(String, Animated<EffectValue>)>: Send,
NodeRef<Owned, String, EffectResourceId, LeafOrInternal>: Send,
BoxRaw<(String, EffectResourceId)>: Send,
NodeRef<Owned, String, Option<NodeId>, LeafOrInternal>: Send,
BoxRaw<(String, Option<NodeId>)>: Send,
impl Sync for Compositionwhere
RawVecInner: Sync,
BoxRaw<DataBinding>: Sync,
BoxRaw<MotionPath>: Sync,
BoxRaw<TextStyle>: Sync,
BoxRaw<LayoutNode>: Sync,
NodeRef<Owned, String, Animated<EffectValue>, LeafOrInternal>: Sync,
BoxRaw<(String, Animated<EffectValue>)>: Sync,
NodeRef<Owned, String, EffectResourceId, LeafOrInternal>: Sync,
BoxRaw<(String, EffectResourceId)>: Sync,
NodeRef<Owned, String, Option<NodeId>, LeafOrInternal>: Sync,
BoxRaw<(String, Option<NodeId>)>: Sync,
impl Unpin for Compositionwhere
*const u8 is !null: Unpin,
Box<DataBinding>: Unpin,
Box<MotionPath>: Unpin,
Box<TextStyle>: Unpin,
Box<LayoutNode>: Unpin,
*const LeafNode<String, Animated<EffectValue>> is !null: Unpin,
Box<(String, Animated<EffectValue>)>: Unpin,
*const LeafNode<String, EffectResourceId> is !null: Unpin,
Box<(String, EffectResourceId)>: Unpin,
*const LeafNode<String, Option<NodeId>> is !null: Unpin,
Box<(String, Option<NodeId>)>: Unpin,
impl UnsafeUnpin for Compositionwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<CompositionNode>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<CompositionControl>: UnsafeUnpin,
impl UnwindSafe for Compositionwhere
RawVecInner: UnwindSafe,
BoxRaw<DataBinding>: UnwindSafe,
BoxRaw<MotionPath>: UnwindSafe,
BoxRaw<TextStyle>: UnwindSafe,
BoxRaw<LayoutNode>: UnwindSafe,
BTreeMap<String, Animated<EffectValue>>: UnwindSafe,
BTreeMap<String, EffectResourceId>: UnwindSafe,
BTreeMap<String, Option<NodeId>>: UnwindSafe,
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