Struct rocfl::ocfl::ObjectVersion
source · [−]pub struct ObjectVersion {
pub id: String,
pub object_root: String,
pub digest_algorithm: DigestAlgorithm,
pub version_details: VersionDetails,
pub state: HashMap<Rc<LogicalPath>, FileDetails>,
}
Expand description
Represents a version of an OCFL object
Fields
id: String
The object’s ID
object_root: String
The path from the storage root to the object root
digest_algorithm: DigestAlgorithm
The algorithm used to calculate digests (sha512 or sha256)
version_details: VersionDetails
Metadata about the version
state: HashMap<Rc<LogicalPath>, FileDetails>
A map of files (logical paths) in the version to details about the files.
Implementations
pub fn from_inventory<S: AsRef<str> + Copy>(
inventory: Inventory,
version_num: VersionRef,
object_storage_path: S,
object_staging_path: Option<S>,
use_backslashes: bool
) -> Result<Self>
pub fn from_inventory<S: AsRef<str> + Copy>(
inventory: Inventory,
version_num: VersionRef,
object_storage_path: S,
object_staging_path: Option<S>,
use_backslashes: bool
) -> Result<Self>
Creates an ObjectVersion
by consuming the supplied Inventory
.
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for ObjectVersion
impl !Send for ObjectVersion
impl !Sync for ObjectVersion
impl Unpin for ObjectVersion
impl UnwindSafe for ObjectVersion
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more