pub enum CloneError {
Symlink(PathBuf),
NotAFile(PathBuf),
CrossVolume {
src: PathBuf,
dst: PathBuf,
},
Unsupported {
path: PathBuf,
source: Error,
},
InvalidPath(PathBuf),
Io {
path: PathBuf,
source: Error,
},
}Expand description
Why a clone was not created. Each variant maps to a stable code for callers and the helper binary.
Variants§
Symlink(PathBuf)
The source is a symbolic link. It is refused, never followed or cloned as a link.
NotAFile(PathBuf)
The source is not a regular file (directory, device, socket, …).
CrossVolume
Source and destination are on different volumes; clonefile needs one volume.
Unsupported
The volume or filesystem cannot clone (not APFS, or the kernel reports ENOTSUP/ENOSYS).
InvalidPath(PathBuf)
The source or destination path cannot be passed to the kernel (embedded NUL).
Io
Any other failure (missing source, destination exists, permissions, …).
Implementations§
Trait Implementations§
Source§impl Debug for CloneError
impl Debug for CloneError
Source§impl Display for CloneError
impl Display for CloneError
Source§impl Error for CloneError
impl Error for CloneError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for CloneError
impl !UnwindSafe for CloneError
impl Freeze for CloneError
impl Send for CloneError
impl Sync for CloneError
impl Unpin for CloneError
impl UnsafeUnpin for CloneError
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