Struct rocfl::ocfl::ContentPath [−][src]
pub struct ContentPath {
pub version: ContentPathVersion,
// some fields omitted
}
Expand description
Represents a path within a version’s content directory. This path must be relative the object root.
Fields
version: ContentPathVersion
The version the content path exists in. This will be a version number, except in the case when the path is in the mutable head extension
Implementations
pub fn for_logical_path(
version_num: VersionNum,
content_dir: &str,
logical_path: &LogicalPath
) -> Self
pub fn for_logical_path(
version_num: VersionNum,
content_dir: &str,
logical_path: &LogicalPath
) -> Self
Creates a new content path by directly mapping the logical path to a content path
Trait Implementations
fn deserialize<D>(deserializer: D) -> Result<ContentPath, D::Error> where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<ContentPath, D::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Performs the conversion.
Returns an iterable containing each segment of the path split on the /
separator
Returns the part of the logical path that’s after the final /
or the entire path if
there is no /
Returns true if the path starts with the given prefix
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for ContentPath
impl Send for ContentPath
impl Sync for ContentPath
impl Unpin for ContentPath
impl UnwindSafe for ContentPath
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
pub fn vzip(self) -> V
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