pub struct Link {
pub path: PathBuf,
pub uid: u32,
pub gid: u32,
pub mode: String,
pub time: i64,
pub link_path: PathBuf,
}Expand description
A link type path in an mtree file that points to a file somewhere on the system.
Fields§
§path: PathBufThe path of the symlink.
uid: u32The user ID of the symlink.
gid: u32The group ID of the symlink.
mode: StringThe file mode of the symlink.
time: i64The modification time of the symlink in seconds since the epoch.
link_path: PathBufThe target path of the symlink.
Implementations§
Source§impl Link
impl Link
Sourcepub fn equals_path(
&self,
input_path: &InputPath<'_, '_>,
) -> Result<(), Vec<PathValidationError>>
pub fn equals_path( &self, input_path: &InputPath<'_, '_>, ) -> Result<(), Vec<PathValidationError>>
Checks whether InputPath equals self.
More specifically, checks that
MTREE_PATH_PREFIXcan be stripped fromself.path,InputPath::pathand the strippedself.pathmatch,InputPath::to_path_bufexists and is a symlink,- metadata can be retrieved for
InputPath::to_path_buf, - the link path of
InputPath::to_path_bufmatches that ofself.link_path, - the modification time of
InputPath::to_path_bufmatches that ofself.time, - the UID of
InputPath::to_path_bufmatches that ofself.uid, - the GID of
InputPath::to_path_bufmatches that ofself.gid, - the mode of
InputPath::to_path_bufmatches that ofself.mode.
§Errors
Returns a list of PathValidationErrors if issues have been found during validation of
input_path.
Trait Implementations§
Source§impl Ord for Link
impl Ord for Link
Source§impl PartialOrd for Link
impl PartialOrd for Link
impl Eq for Link
impl StructuralPartialEq for Link
Auto Trait Implementations§
impl Freeze for Link
impl RefUnwindSafe for Link
impl Send for Link
impl Sync for Link
impl Unpin for Link
impl UnwindSafe for Link
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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