pub trait PathExt {
// Required methods
fn set_owner<E: Into<FileOwnerError>>(
&self,
owner: impl TryInto<Owner, Error = E>,
) -> Result<(), FileOwnerError>;
fn set_group<E: Into<FileOwnerError>>(
&self,
group: impl TryInto<Group, Error = E>,
) -> Result<(), FileOwnerError>;
fn set_owner_group<E1: Into<FileOwnerError>, E2: Into<FileOwnerError>>(
&self,
owner: impl TryInto<Owner, Error = E1>,
group: impl TryInto<Group, Error = E2>,
) -> Result<(), FileOwnerError>;
fn owner(&self) -> Result<Owner, FileOwnerError>;
fn group(&self) -> Result<Group, FileOwnerError>;
fn owner_group(&self) -> Result<(Owner, Group), FileOwnerError>;
}Expand description
Extension methods for T: AsRef<Path>.
Required Methods§
Sourcefn set_owner<E: Into<FileOwnerError>>(
&self,
owner: impl TryInto<Owner, Error = E>,
) -> Result<(), FileOwnerError>
fn set_owner<E: Into<FileOwnerError>>( &self, owner: impl TryInto<Owner, Error = E>, ) -> Result<(), FileOwnerError>
Sets owner to file at the given path.
Sourcefn set_group<E: Into<FileOwnerError>>(
&self,
group: impl TryInto<Group, Error = E>,
) -> Result<(), FileOwnerError>
fn set_group<E: Into<FileOwnerError>>( &self, group: impl TryInto<Group, Error = E>, ) -> Result<(), FileOwnerError>
Sets group to file at the given path.
Sourcefn set_owner_group<E1: Into<FileOwnerError>, E2: Into<FileOwnerError>>(
&self,
owner: impl TryInto<Owner, Error = E1>,
group: impl TryInto<Group, Error = E2>,
) -> Result<(), FileOwnerError>
fn set_owner_group<E1: Into<FileOwnerError>, E2: Into<FileOwnerError>>( &self, owner: impl TryInto<Owner, Error = E1>, group: impl TryInto<Group, Error = E2>, ) -> Result<(), FileOwnerError>
Sets owner and group to file at the given path.
Sourcefn owner(&self) -> Result<Owner, FileOwnerError>
fn owner(&self) -> Result<Owner, FileOwnerError>
Gets owner of a file at the given path.
Sourcefn group(&self) -> Result<Group, FileOwnerError>
fn group(&self) -> Result<Group, FileOwnerError>
Gets group of a file at the given path.
Sourcefn owner_group(&self) -> Result<(Owner, Group), FileOwnerError>
fn owner_group(&self) -> Result<(Owner, Group), FileOwnerError>
Gets owner and group of a file at the given path.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".