Skip to main content

ResourceMovementError

Enum ResourceMovementError 

Source
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

§src_path: PathBuf

Source path of the resource.

§dest_path: PathBuf

The path at which a resource with the same name is located.

§

DestinationPathIsInvalid

The new path for a resource is invalid.

Fields

§src_path: PathBuf

Source path of the resource.

§dest_path: PathBuf

The invalid destination path.

§

ResourceRegistryLocationUnknown

Resource registry location is unknown (the registry wasn’t saved yet).

Fields

§resource_path: PathBuf

A path of the resource being moved.

§

NotInRegistry

The resource is not in the registry.

Fields

§resource_path: PathBuf

A path of the resource being moved.

§

OutsideOfRegistry

Attempting to move a resource outside the registry.

Fields

§absolute_src_path: PathBuf

An absolute path of the resource being moved.

§absolute_dest_dir: PathBuf

An absolute path of the destination folder.

§absolute_registry_dir: PathBuf

An absolute path of the resource registry.

§

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

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for ResourceMovementError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<Error> for ResourceMovementError

Source§

fn from(value: Error) -> Self

Converts to this type from the input type.
Source§

impl From<FileError> for ResourceMovementError

Source§

fn from(value: FileError) -> Self

Converts to this type from the input type.
Source§

impl From<ResourceMovementError> for FolderMovementError

Source§

fn from(value: ResourceMovementError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AsyncTaskResult for T
where T: Any + Send + 'static,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> ObjectOrVariant<T> for U

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

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

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> ResourceLoadError for T
where T: 'static + Debug + Display + Send + Sync,