pub struct SharedRelativeOriginalUri { /* private fields */ }Expand description
A canonical ./-prefixed URI identity for direct children in shared repositories.
Implementations§
Sourcepub fn from_raw_child_name(name: &[u8]) -> Result<Self>
pub fn from_raw_child_name(name: &[u8]) -> Result<Self>
Constructs a shared URI from one raw direct child filename.
§Errors
Returns an error when the filename is empty, is . or .., contains /, or contains NUL.
Sourcepub fn parse(uri: &str) -> Result<Self>
pub fn parse(uri: &str) -> Result<Self>
Parses textual ./ shared URI input without allowing encoded path separators.
§Errors
Returns an error when the URI is not ASCII ./ text for exactly one direct child filename,
contains invalid percent escapes, or decodes to an invalid child filename.
Sourcepub fn thumbnail_file_name(&self) -> String
pub fn thumbnail_file_name(&self) -> String
Returns the Freedesktop thumbnail filename for this URI identity.
Trait Implementations§
Source§fn clone(&self) -> SharedRelativeOriginalUri
fn clone(&self) -> SharedRelativeOriginalUri
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§fn cmp(&self, other: &SharedRelativeOriginalUri) -> Ordering
fn cmp(&self, other: &SharedRelativeOriginalUri) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§fn eq(&self, other: &SharedRelativeOriginalUri) -> bool
fn eq(&self, other: &SharedRelativeOriginalUri) -> bool
Tests for
self and other values to be equal, and is used by ==.Auto Trait Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more