pub struct OriginalMediaImport { /* private fields */ }Expand description
A validated aggregate representing an imported asset and original media.
Implementations§
Source§impl OriginalMediaImport
impl OriginalMediaImport
Sourcepub fn new(
asset: Asset,
representation: Representation,
resources: Vec<Resource>,
locators: Vec<Locator>,
) -> Result<Self>
pub fn new( asset: Asset, representation: Representation, resources: Vec<Resource>, locators: Vec<Locator>, ) -> Result<Self>
Creates an import aggregate whose ownership relationships are consistent.
§Errors
Returns ErrorKind::InvalidArgument if ownership is inconsistent, a
referenced resource is absent or duplicated, an extra resource is
supplied, or any resource lacks a locator.
Sourcepub const fn representation(&self) -> &Representation
pub const fn representation(&self) -> &Representation
Returns the original representation.
Sourcepub fn resources(&self) -> &[Resource]
pub fn resources(&self) -> &[Resource]
Returns the storage resources realizing the representation.
Sourcepub fn locators(&self) -> &[Locator]
pub fn locators(&self) -> &[Locator]
Returns the known access routes for the imported resources.
Sourcepub fn into_parts(self) -> (Asset, Representation, Vec<Resource>, Vec<Locator>)
pub fn into_parts(self) -> (Asset, Representation, Vec<Resource>, Vec<Locator>)
Splits the aggregate into persistable domain values.
Trait Implementations§
Source§impl Clone for OriginalMediaImport
impl Clone for OriginalMediaImport
Source§fn clone(&self) -> OriginalMediaImport
fn clone(&self) -> OriginalMediaImport
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OriginalMediaImport
impl Debug for OriginalMediaImport
impl Eq for OriginalMediaImport
Source§impl PartialEq for OriginalMediaImport
impl PartialEq for OriginalMediaImport
Source§fn eq(&self, other: &OriginalMediaImport) -> bool
fn eq(&self, other: &OriginalMediaImport) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for OriginalMediaImport
Auto Trait Implementations§
impl Freeze for OriginalMediaImport
impl RefUnwindSafe for OriginalMediaImport
impl Send for OriginalMediaImport
impl Sync for OriginalMediaImport
impl Unpin for OriginalMediaImport
impl UnsafeUnpin for OriginalMediaImport
impl UnwindSafe for OriginalMediaImport
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