pub enum ResourceMovementError {
Io(Error),
FileError(FileError),
AlreadyExist {
src_path: PathBuf,
dest_path: PathBuf,
},
DestinationPathIsInvalid {
src_path: PathBuf,
dest_path: PathBuf,
},
ResourceRegistryLocationUnknown {
resource_path: PathBuf,
},
NotInRegistry {
resource_path: PathBuf,
},
OutsideOfRegistry {
absolute_src_path: PathBuf,
absolute_dest_dir: PathBuf,
absolute_registry_dir: PathBuf,
},
NoPath(UntypedResource),
}Expand description
A possible set of errors that may occur during resource movement.
Variants§
Io(Error)
An IO error.
FileError(FileError)
A file error.
AlreadyExist
The resource at the src_path already exist at the dest_path.
Fields
DestinationPathIsInvalid
The new path for a resource is invalid.
Fields
ResourceRegistryLocationUnknown
Resource registry location is unknown (the registry wasn’t saved yet).
NotInRegistry
The resource is not in the registry.
OutsideOfRegistry
Attempting to move a resource outside the registry.
Fields
NoPath(UntypedResource)
A resource has no path. It is either an embedded resource or in an invalid state (failed to load or still loading).
Trait Implementations§
Source§impl Debug for ResourceMovementError
impl Debug for ResourceMovementError
Source§impl Display for ResourceMovementError
impl Display for ResourceMovementError
Source§impl From<Error> for ResourceMovementError
impl From<Error> for ResourceMovementError
Source§impl From<FileError> for ResourceMovementError
impl From<FileError> for ResourceMovementError
Source§impl From<ResourceMovementError> for FolderMovementError
impl From<ResourceMovementError> for FolderMovementError
Source§fn from(value: ResourceMovementError) -> Self
fn from(value: ResourceMovementError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ResourceMovementError
impl !RefUnwindSafe for ResourceMovementError
impl Send for ResourceMovementError
impl Sync for ResourceMovementError
impl Unpin for ResourceMovementError
impl UnsafeUnpin for ResourceMovementError
impl !UnwindSafe for ResourceMovementError
Blanket Implementations§
Source§impl<T> AsyncTaskResult for T
impl<T> AsyncTaskResult 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
Source§impl<T, U> ObjectOrVariant<T> for Uwhere
PhantomData<U>: ObjectOrVariantHelper<T, U>,
impl<T, U> ObjectOrVariant<T> for Uwhere
PhantomData<U>: ObjectOrVariantHelper<T, U>,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.