Skip to main content

FileValidationError

Enum FileValidationError 

Source
pub enum FileValidationError {
    NotInAssetMap {
        uuid: String,
        original_file_name: Option<String>,
    },
    Missing {
        uuid: String,
        path: PathBuf,
    },
    SizeMismatch {
        uuid: String,
        path: PathBuf,
        expected: u64,
        actual: u64,
    },
    HashMismatch {
        uuid: String,
        path: PathBuf,
        expected: String,
        actual: String,
    },
    Io {
        uuid: String,
        path: PathBuf,
        message: String,
    },
    DuplicatePklAssetId {
        uuid: String,
        pkl_id: String,
    },
    UnknownPklNamespace {
        pkl_id: String,
        namespace: String,
    },
    AssetMapHasNoPackingList,
    PklIdNotInAssetMap {
        pkl_id: String,
    },
}
Expand description

Errors found during PKL file manifest / hash / cross-reference validation.

Per SMPTE ST 2067-2 §7-9, the AssetMap, PKL, and CPL must maintain consistent cross-references. These errors describe structural violations.

Variants§

§

NotInAssetMap

PKL lists an asset UUID that has no entry in the AssetMap (ST 2067-2 §7).

Fields

§uuid: String
§original_file_name: Option<String>
§

Missing

File expected on disk but not found.

Fields

§uuid: String
§path: PathBuf
§

SizeMismatch

File exists but its byte size differs from the PKL declaration.

Fields

§uuid: String
§path: PathBuf
§expected: u64
§actual: u64
§

HashMismatch

Hash digest does not match PKL hash (SHA-1 or SHA-256).

Fields

§uuid: String
§path: PathBuf
§expected: String
§actual: String
§

Io

I/O error while reading the file for hashing.

Fields

§uuid: String
§path: PathBuf
§message: String
§

DuplicatePklAssetId

Same asset UUID appears more than once in a single PKL (ST 2067-2 §9).

Fields

§uuid: String
§pkl_id: String
§

UnknownPklNamespace

PKL document carries a namespace URI we don’t recognise. Per ST 429-8 (the canonical PKL standard) and ST 2067-2:2016, the only acceptable values are the published namespaces; an unrecognised one breaks downstream tool interoperability.

Fields

§pkl_id: String
§namespace: String
§

AssetMapHasNoPackingList

The AssetMap has no asset carrying <PackingList>true</PackingList>, so no PKL document is declared. ST 429-9 §6.3 requires the AssetMap to identify which assets are PKLs.

§

PklIdNotInAssetMap

A PKL document was parsed but its Id does not appear as a PackingList-flagged asset in the AssetMap. ST 429-9 §6.3 requires every PKL to be declared in the AssetMap.

Fields

§pkl_id: String

Implementations§

Trait Implementations§

Source§

impl Debug for FileValidationError

Source§

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

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

impl Display for FileValidationError

Source§

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

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

impl From<&FileValidationError> for ValidationIssue

Source§

fn from(err: &FileValidationError) -> Self

Converts to this type from the input type.

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> 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> Same for T

Source§

type Output = T

Should always be Self
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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.