Skip to main content

ModelError

Enum ModelError 

Source
#[non_exhaustive]
pub enum ModelError {
Show 81 variants UnsupportedSchemaVersion { found: u32, }, TooManyDataSets { found: usize, maximum: usize, }, DuplicateDataSetId(DataSetId), InvalidDataSet { data: DataSetId, problem: DataProblem, }, InvalidDataBinding { owner: DataOwner, at: String, problem: BindingProblem, }, EmptyIdentifier, DuplicateSourceId(SourceId), DuplicateEffectResourceId(EffectResourceId), DuplicateTrackId(TrackId), DuplicateClipId(ClipId), EmptyLocator { source: SourceId, }, AudioOnImage { source: SourceId, }, InvalidProvider { source: SourceId, }, InvalidFingerprint { source: SourceId, }, ContradictoryColor { source: SourceId, }, InvalidGenerator { source: SourceId, }, InvalidShape { owner: ShapeOwner, at: String, problem: ShapeProblem, }, InvalidLayout { owner: ShapeOwner, at: String, problem: LayoutProblem, }, InvalidTextRunStyle { owner: ShapeOwner, run: usize, }, EmptyEffectResourceLocator { resource: EffectResourceId, }, UnknownEffectResource { clip: ClipId, resource: EffectResourceId, }, EmptyClipRange { clip: ClipId, }, NegativeClipRange { clip: ClipId, }, OverlappingClips { track: TrackId, first: ClipId, second: ClipId, }, UnknownClipSource { clip: ClipId, source: SourceId, }, IncompatibleClipSource { clip: ClipId, track: TrackId, source: SourceId, }, InvalidVisualProperties { clip: ClipId, }, InvalidAudioProperties { clip: ClipId, }, InvalidTrackAudio { track: TrackId, }, InvalidMasterAudio, InvalidDuckingSidechain { track: TrackId, sidechain: TrackId, }, UnknownComposition { clip: ClipId, composition: CompositionId, }, InvalidClipComposition { clip: ClipId, }, DuplicateCompositionId(CompositionId), InvalidNodeId { composition: CompositionId, node: NodeId, }, DuplicateNodeId { composition: CompositionId, node: NodeId, }, TooManyCompositionNodes { composition: CompositionId, found: usize, maximum: usize, }, InvalidNode { composition: CompositionId, node: NodeId, }, UnknownNodeInput { composition: CompositionId, node: NodeId, input: String, target: NodeId, }, CompositionCycle { composition: CompositionId, node: NodeId, }, UnknownCompositionOutput { composition: CompositionId, node: NodeId, }, InvalidNodeSource { composition: CompositionId, node: NodeId, source: SourceId, }, InvalidCompositionPorts { composition: CompositionId, }, UnknownGroupComposition { composition: CompositionId, node: NodeId, target: CompositionId, }, CompositionUsesItself { composition: CompositionId, }, CompositionNestedTooDeep { composition: CompositionId, maximum: usize, }, TooManyInlinedNodes { maximum: usize, }, FrameDrawsTooManyNodes { clip: ClipId, found: u64, maximum: usize, }, InvalidCompositionSource { source: SourceId, }, InvalidAdjustmentSource { source: SourceId, }, InvalidAdjustmentTransition { track: TrackId, clip: ClipId, }, InvalidEffect { owner: Box<EffectOwner>, id: String, problem: EffectProblem, }, UnknownNodeResource { composition: CompositionId, node: NodeId, resource: EffectResourceId, }, InvalidClipMask { clip: ClipId, }, InvalidCaptions { track: TrackId, }, UnknownCaptionStyle { track: TrackId, cue: usize, name: String, }, InvalidCaptionCueStyle { track: TrackId, cue: usize, }, InvalidTimeMap { clip: ClipId, }, TooManyLoopPasses { clip: ClipId, found: u64, maximum: u64, }, InvalidMatte { clip: ClipId, }, InvalidClipTransition { track: TrackId, }, TransitionCycle { track: TrackId, at: MediaTime, }, DuplicateTransition { track: TrackId, first: ClipId, second: ClipId, }, TooManyDerivedCues { track: TrackId, }, UnwritableTime { ticks: i64, }, TooManyEffectResources { found: usize, maximum: usize, }, TooManyCompositions { found: usize, maximum: usize, }, TooManySources { found: usize, maximum: usize, }, TooManyTracks { found: usize, maximum: usize, }, TooManyClips { found: usize, maximum: usize, }, TooManyAudioEffects { found: usize, maximum: usize, at_ticks: i64, }, TooMuchAudioDelay { found_ms: u64, maximum_ms: u32, at_ticks: i64, }, TooManyClipsOnTrack { track: TrackId, found: usize, maximum: usize, }, TooManyCaptionCues { track: TrackId, found: usize, maximum: usize, }, TooManyTransitions { track: TrackId, found: usize, maximum: usize, }, ZeroCanvasDimension, CanvasDimensionTooLarge { width: u32, height: u32, maximum: u32, }, CanvasPixelBudgetExceeded { pixels: u64, maximum: u64, }, InvalidBackground, InvalidColorPipeline, UnsupportedSampleRate { found: u32, minimum: u32, maximum: u32, },
}
Expand description

A document invariant violation.

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.
§

UnsupportedSchemaVersion

This build cannot interpret the document version.

Fields

§found: u32

Version found in the decoded document.

§

TooManyDataSets

The project has more than crate::MAX_DATA_SETS data sets.

Fields

§found: usize

Data sets in the document.

§maximum: usize

Largest accepted count.

§

DuplicateDataSetId(DataSetId)

Two data sets share one ID.

§

InvalidDataSet

A data set breaks a rule of its kind.

Fields

§data: DataSetId

The data set.

§problem: DataProblem

What is wrong.

§

InvalidDataBinding

A data binding, correction or caption words reference is unusable where it sits.

Fields

§owner: DataOwner

What holds it.

§at: String

The property, like visual.position, masks[0].feather, effect.params.radius, visual.correction or captions.from_words.

§problem: BindingProblem

What is wrong.

§

EmptyIdentifier

At least one ID was empty.

§

DuplicateSourceId(SourceId)

Two sources share one ID.

§

DuplicateEffectResourceId(EffectResourceId)

Two effect resources share one ID.

§

DuplicateTrackId(TrackId)

Two tracks share one ID.

§

DuplicateClipId(ClipId)

Two clips share one ID.

§

EmptyLocator

A source locator was empty.

Fields

§source: SourceId

Source whose locator was empty.

§

AudioOnImage

A still image source says it has audio, which no image holds.

Fields

§source: SourceId

The image source.

§

InvalidProvider

A source’s provider does not fit it (wrong source kind, audio, or incoherent settings), or a generated source has one.

Fields

§source: SourceId

The source.

§

InvalidFingerprint

A source’s fingerprint is malformed, or a generated source has one.

Fields

§source: SourceId

The source.

§

ContradictoryColor

A source declares a color whose dynamic range contradicts its transfer (HDR is exactly a PQ or HLG transfer).

Fields

§source: SourceId

The source.

§

InvalidGenerator

A generated source has no valid generator, or has a locator, color metadata or audio; or another source has a generator.

Fields

§source: SourceId

The source.

§

InvalidShape

A shapes content tree or mask outline breaks a limit, has a value out of range, or has keyframes that cannot interpolate.

Fields

§owner: ShapeOwner

What holds the shape.

§at: String

Where the problem lies, like items[2].items[0].path or masks[1].shape.size.

§problem: ShapeProblem

What is wrong there.

§

InvalidLayout

A layout tree breaks a limit or structure rule, has a value out of range, or has keyframes that cannot interpolate.

Fields

§owner: ShapeOwner

What holds the layout.

§at: String

Where in it the problem lies, like root.children[2].padding.

§problem: LayoutProblem

What is wrong there.

§

InvalidTextRunStyle

A text generator’s run has a style out of range once applied, or the runs draw in more than crate::MAX_TEXT_FONT_SELECTIONS font selections from this run on.

Fields

§owner: ShapeOwner

What holds the text generator.

§run: usize

The run’s position among the text’s runs.

§

EmptyEffectResourceLocator

An effect resource locator was empty.

Fields

§resource: EffectResourceId

Resource whose locator was empty.

§

UnknownEffectResource

A clip effect references an absent effect resource.

Fields

§clip: ClipId

Clip containing the reference.

§resource: EffectResourceId

Missing resource identity.

§

EmptyClipRange

A clip has an empty source or timeline range.

Fields

§clip: ClipId

Clip with an empty range.

§

NegativeClipRange

A clip starts before the project or source timeline origin.

Fields

§clip: ClipId

Clip with a negative range start.

§

OverlappingClips

Two clips overlap without one transition covering their intersection.

Fields

§track: TrackId

Track containing the overlap.

§first: ClipId

First overlapping clip.

§second: ClipId

Second overlapping clip.

§

UnknownClipSource

A clip refers to an absent source.

Fields

§clip: ClipId

Clip containing the absent source reference.

§source: SourceId

Referenced source that was not in the project.

§

IncompatibleClipSource

A source cannot be placed on the selected track kind.

Fields

§clip: ClipId

Clip containing the incompatible reference.

§track: TrackId

Track that cannot accept the source kind.

§source: SourceId

Source with the incompatible kind.

§

InvalidVisualProperties

A visual clip has non-finite values, invalid opacity, or unordered keyframes.

Fields

§clip: ClipId

Clip containing the invalid presentation data.

§

InvalidAudioProperties

A clip has an invalid gain, pan, fade, or audio effect parameter.

Fields

§clip: ClipId

Clip containing the invalid audio data.

§

InvalidTrackAudio

A track bus has an invalid gain, pan, effect, or ducking parameter.

Fields

§track: TrackId

Track containing the invalid bus data.

§

InvalidMasterAudio

The project master bus has an invalid gain, effect, or limiter parameter.

§

InvalidDuckingSidechain

A ducking sidechain names a missing track, itself, or forms a cycle.

Fields

§track: TrackId

Track whose ducking reference is unusable.

§sidechain: TrackId

Referenced sidechain track.

§

UnknownComposition

A clip names an absent composition.

Fields

§clip: ClipId

The clip.

§composition: CompositionId

The composition it names.

§

InvalidClipComposition

A clip’s composition has a non-positive scale, reaches a composition time past alpha2_time::MAX_SERIALIZED_TICKS before the clip ends, or is on an audio clip.

Fields

§clip: ClipId

The clip.

§

DuplicateCompositionId(CompositionId)

Two compositions share one ID.

§

InvalidNodeId

A node ID contains /, which is reserved for joining the IDs of inlined group and media nodes.

Fields

§composition: CompositionId

The composition.

§node: NodeId

The node ID.

§

DuplicateNodeId

Two nodes of one composition share an ID.

Fields

§composition: CompositionId

The composition.

§node: NodeId

The repeated node ID.

§

TooManyCompositionNodes

A composition has more nodes than the renderer will schedule.

Fields

§composition: CompositionId

The composition.

§found: usize

Number supplied by the document.

§maximum: usize

Largest supported count.

§

InvalidNode

A node has an invalid setting: effect identity, version, parameter or value; transform, progress, opacity or mask out of range; too many merge layers or masks; or a bypass on a node without inputs.

Fields

§composition: CompositionId

The composition.

§node: NodeId

The node.

§

UnknownNodeInput

A node input names a node its composition does not have.

Fields

§composition: CompositionId

The composition.

§node: NodeId

The node whose input it is.

§input: String

The input: input, from, to, matte, layers[i], or inputs[i].

§target: NodeId

The node named.

§

CompositionCycle

A node depends on its own output.

Fields

§composition: CompositionId

The composition.

§node: NodeId

A node on the cycle.

§

UnknownCompositionOutput

A composition’s output names a node it does not have.

Fields

§composition: CompositionId

The composition.

§node: NodeId

The node named.

§

InvalidNodeSource

A media node names an absent source or one that is not visual.

Fields

§composition: CompositionId

The composition.

§node: NodeId

The node.

§source: SourceId

The source named.

§

InvalidCompositionPorts

A composition’s group inputs are unnamed, repeated or too many, or a control names no effect setting of its nodes or repeats one.

Fields

§composition: CompositionId

The composition.

§

UnknownGroupComposition

A group node names an absent composition.

Fields

§composition: CompositionId

The composition holding the group node.

§node: NodeId

The group node.

§target: CompositionId

The composition it names.

§

CompositionUsesItself

A composition uses itself through group nodes or composition sources.

Fields

§composition: CompositionId

A composition on the loop.

§

CompositionNestedTooDeep

Compositions nest, through group nodes or composition sources, more than crate::MAX_COMPOSITION_DEPTH deep.

Fields

§composition: CompositionId

The first such composition, in document order.

§maximum: usize

Deepest supported nesting.

§

TooManyInlinedNodes

The compositions draw more than crate::MAX_INLINED_NODES nodes, counting each group node and composition-source media node as the nodes it draws.

Fields

§maximum: usize

Largest supported count.

§

FrameDrawsTooManyNodes

The clips at one instant draw more than crate::MAX_FRAME_INLINED_NODES composition nodes together.

Fields

§clip: ClipId

The first clip, in document order, starting at the first such instant.

§found: u64

The nodes the clips at that instant draw.

§maximum: usize

Largest supported count.

§

InvalidCompositionSource

A composition source names an absent composition, or has what only a host-supplied source has.

Fields

§source: SourceId

The source.

§

InvalidAdjustmentSource

An adjustment source has more than an ID and its kind: a locator, generator, composition, color, fingerprint, provider or audio.

Fields

§source: SourceId

The source.

§

InvalidAdjustmentTransition

A transition from or to an adjustment clip is not alpha2.transition.fade.

Fields

§track: TrackId

The track holding the transition.

§clip: ClipId

The adjustment clip it names, its from_clip first.

§

InvalidEffect

An effect or transition under crate::BUILTIN_EFFECT_PREFIX that does not match its built-in definition.

Fields

§owner: Box<EffectOwner>

Where it is used.

§id: String

The effect id.

§problem: EffectProblem

How it fails its definition.

§

UnknownNodeResource

A node’s effect references an absent effect resource.

Fields

§composition: CompositionId

The composition.

§node: NodeId

The node.

§resource: EffectResourceId

The resource named.

§

InvalidClipMask

A clip has more than crate::MAX_CLIP_MASKS masks, a mask with a negative or non-finite value, or masks on an audio track.

Fields

§clip: ClipId

Clip carrying the invalid mask.

§

InvalidCaptions

A caption track has no captions, has clips or transitions, or has invalid cues or style; or another track has captions.

Fields

§track: TrackId

The track.

§

UnknownCaptionStyle

A caption cue names a style its track does not have.

Fields

§track: TrackId

The track.

§cue: usize

The cue’s position among the track’s cues.

§name: String

The style it names.

§

InvalidCaptionCueStyle

A caption cue’s style (its track’s with the cue’s patch applied), or the style of one of its runs over it, is out of range, or its runs draw in more than crate::MAX_TEXT_FONT_SELECTIONS font selections.

Fields

§track: TrackId

The track.

§cue: usize

The cue’s position among the track’s cues.

§

InvalidTimeMap

A clip freezes on an instant outside its source range.

Fields

§clip: ClipId

The clip.

§

TooManyLoopPasses

A looping clip makes more than crate::MAX_LOOP_PASSES passes.

Fields

§clip: ClipId

The clip.

§found: u64

Its passes, rounded up.

§maximum: u64

The most passes a clip makes.

§

InvalidMatte

A clip’s matte names no visual clip, itself, a clip with its own matte, an adjustment clip, or a clip in a transition; or an audio or adjustment clip has a matte.

Fields

§clip: ClipId

Clip whose matte is invalid.

§

InvalidClipTransition

A transition is not contained in two distinct visual clips on its track.

Fields

§track: TrackId

Track containing the invalid transition.

§

TransitionCycle

Transitions active at one instant lead from clip to clip in a circle, leaving no clip to show.

Fields

§track: TrackId

Track containing the transitions.

§at: MediaTime

An instant they are all active.

§

DuplicateTransition

Two clips have more than one transition between them, in either direction.

Fields

§track: TrackId

Track containing the transitions.

§first: ClipId

The transition’s first clip.

§second: ClipId

The transition’s second clip.

§

TooManyDerivedCues

A caption track derives more than crate::MAX_DERIVED_CUES cues from its words, or maps more than crate::MAX_DATA_WORDS words through its clips.

Fields

§track: TrackId

The caption track.

§

UnwritableTime

A time lies past alpha2_time::MAX_SERIALIZED_TICKS either way, which no document holds.

Fields

§ticks: i64

The time, in ticks.

§

TooManyEffectResources

The project has more than crate::MAX_EFFECT_RESOURCES effect resources.

Fields

§found: usize

Number supplied by the document.

§maximum: usize

Largest supported count.

§

TooManyCompositions

The project contains too many compositions.

Fields

§found: usize

Number supplied by the document.

§maximum: usize

Largest supported count.

§

TooManySources

The source table exceeds the bounded project resource budget.

Fields

§found: usize

Number supplied by the document.

§maximum: usize

Largest supported count.

§

TooManyTracks

The timeline contains too many tracks.

Fields

§found: usize

Number supplied by the document.

§maximum: usize

Largest supported count.

§

TooManyClips

The timeline contains too many clips in total.

Fields

§found: usize

Number supplied by the document.

§maximum: usize

Largest supported count.

§

TooManyAudioEffects

More audio effects hold state at once than crate::MAX_AUDIO_EFFECTS (see crate::Project::audio_effect_load).

Fields

§found: usize

The most effects holding state at once.

§maximum: usize

Largest supported count.

§at_ticks: i64

The earliest timeline position, in ticks, at which found hold state.

§

TooMuchAudioDelay

The audio effects hold more than crate::MAX_AUDIO_DELAY_MS of delay at once (see crate::Project::audio_effect_load).

Fields

§found_ms: u64

The most milliseconds held at once, rounded up.

§maximum_ms: u32

Largest supported total.

§at_ticks: i64

The earliest timeline position, in ticks, at which found_ms is held.

§

TooManyClipsOnTrack

One track contains too many clips.

Fields

§track: TrackId

Track containing the excessive clip list.

§found: usize

Number supplied by the document.

§maximum: usize

Largest supported count.

§

TooManyCaptionCues

A caption track holds more than crate::MAX_CLIPS_PER_TRACK cues.

Fields

§track: TrackId

The caption track.

§found: usize

Number supplied by the document.

§maximum: usize

Largest supported count.

§

TooManyTransitions

One track contains too many transitions.

Fields

§track: TrackId

Track containing the excessive transition list.

§found: usize

Number supplied by the document.

§maximum: usize

Largest supported count.

§

ZeroCanvasDimension

Width or height was zero.

§

CanvasDimensionTooLarge

A canvas edge exceeds the portable GPU-independent limit.

Fields

§width: u32

Supplied width.

§height: u32

Supplied height.

§maximum: u32

Largest supported edge.

§

CanvasPixelBudgetExceeded

The canvas area exceeds the bounded pixel budget.

Fields

§pixels: u64

Supplied pixel area.

§maximum: u64

Largest supported pixel area.

§

InvalidBackground

A background component is non-finite or outside 0..=1.

§

InvalidColorPipeline

The color pipeline’s HDR peak is outside crate::HDR_PEAK_NITS_RANGE.

§

UnsupportedSampleRate

The project sample rate is outside the supported DSP interval.

Fields

§found: u32

Supplied rate.

§minimum: u32

Smallest supported rate.

§maximum: u32

Largest supported rate.

Implementations§

Source§

impl ModelError

Source

pub const fn subject(&self) -> Option<ErrorSubject<'_>>

The document object this error is about, or None for one about the whole project.

An overlap names its second clip, a duplicate transition its track.

Trait Implementations§

Source§

impl Clone for ModelError

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 ModelError

Source§

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

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

impl Display for ModelError

Source§

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

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

impl Eq for ModelError

Source§

impl Error for ModelError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Replaced by Error::source.
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl PartialEq for ModelError

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ModelError

Auto Trait Implementations§

§

impl Forget for ModelError

§

impl Freeze for ModelError

§

impl Move for ModelError

§

impl RefUnwindSafe for ModelError

§

impl Send for ModelError
where RawVecInner: Send, &'static str: Send, BoxRaw<EffectOwner>: Send,

§

impl Sync for ModelError
where RawVecInner: Sync, BoxRaw<EffectOwner>: Sync,

§

impl Unpin for ModelError
where *const u8 is !null: Unpin, &'static str: Unpin, Box<EffectOwner>: Unpin,

§

impl UnsafeUnpin for ModelError

§

impl UnwindSafe for ModelError
where RawVecInner: UnwindSafe, &'static str: UnwindSafe, BoxRaw<EffectOwner>: UnwindSafe,

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<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> 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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.