Skip to main content

ModelError

Enum ModelError 

Source
#[non_exhaustive]
pub enum ModelError {
Show 65 variants UnsupportedSchemaVersion { found: u32, }, 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, }, 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, }, UnknownNodeResource { composition: CompositionId, node: NodeId, resource: EffectResourceId, }, InvalidClipMask { clip: ClipId, }, InvalidCaptions { track: TrackId, }, InvalidTimeMap { clip: ClipId, }, InvalidMatte { clip: ClipId, }, InvalidClipTransition { track: TrackId, }, TransitionCycle { track: TrackId, at: MediaTime, }, DuplicateTransition { track: TrackId, first: ClipId, second: ClipId, }, 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.

§

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: another kind of source than the provider supplies, 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 its transfer contradicts: 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.

§

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 has a /, which joins the IDs of the group and media nodes a drawn node was inlined through.

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: an effect identity, version, parameter, or value; a 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

A composition draws compositions, through group nodes or composition sources, nested 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 nodes than crate::MAX_INLINED_NODES, each group node and composition-source media node counted as the nodes of the composition it draws.

Fields

§maximum: usize

Largest supported count.

§

FrameDrawsTooManyNodes

The clips on the timeline 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.

§

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, or has clips or transitions, or its cues or style are invalid; or another track has captions.

Fields

§track: TrackId

The track.

§

InvalidTimeMap

A clip freezes on an instant outside its source range.

Fields

§clip: ClipId

The clip.

§

InvalidMatte

A clip’s matte names no visual clip, itself, a clip with a matte of its own, or a clip in a transition; or an audio 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, which leaves 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: each overlap shows exactly one.

Fields

§track: TrackId

Track containing the transitions.

§first: ClipId

The transition’s first clip.

§second: ClipId

The transition’s second clip.

§

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 of the project’s 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 project’s 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.

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

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§

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.