pub struct RepresentationImport { /* private fields */ }Expand description
A validated representation and the storage resources that realize it.
Implementations§
Source§impl RepresentationImport
impl RepresentationImport
Sourcepub fn new(
representation: Representation,
resources: Vec<Resource>,
locators: Vec<Locator>,
) -> Result<Self>
pub fn new( representation: Representation, resources: Vec<Resource>, locators: Vec<Locator>, ) -> Result<Self>
Creates an import aggregate whose resource relationships are consistent.
§Errors
Returns ErrorKind::InvalidArgument if 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 representation being imported.
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) -> (Representation, Vec<Resource>, Vec<Locator>)
pub fn into_parts(self) -> (Representation, Vec<Resource>, Vec<Locator>)
Splits the aggregate into persistable domain values.
Trait Implementations§
Source§impl Clone for RepresentationImport
impl Clone for RepresentationImport
Source§fn clone(&self) -> RepresentationImport
fn clone(&self) -> RepresentationImport
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 RepresentationImport
impl Debug for RepresentationImport
impl Eq for RepresentationImport
Source§impl PartialEq for RepresentationImport
impl PartialEq for RepresentationImport
Source§fn eq(&self, other: &RepresentationImport) -> bool
fn eq(&self, other: &RepresentationImport) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for RepresentationImport
Auto Trait Implementations§
impl Freeze for RepresentationImport
impl RefUnwindSafe for RepresentationImport
impl Send for RepresentationImport
impl Sync for RepresentationImport
impl Unpin for RepresentationImport
impl UnsafeUnpin for RepresentationImport
impl UnwindSafe for RepresentationImport
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