pub enum EngineError {
Show 17 variants
ObjectNotFound(Id<ObjectIdMarker>),
PathNotFound(VirtualPath),
NotADirectory(Id<ObjectIdMarker>),
NotAFile(Id<ObjectIdMarker>),
NameAlreadyExists {
name: Name,
directory: Id<ObjectIdMarker>,
},
InvalidName(String),
InvalidPath(String),
InvalidMetadataKey(String),
CyclicMove(Id<ObjectIdMarker>),
CyclicCopy(Id<ObjectIdMarker>),
SymlinkLoop(String),
AttachedObject(Id<ObjectIdMarker>),
CyclicAttach(Id<ObjectIdMarker>),
RootMove,
RootDelete,
RootDetach,
NotAuthorized {
object: Id<ObjectIdMarker>,
operation: Operation,
actor: Option<Id<ActorIdMarker>>,
},
}Expand description
The error type for all Engine operations.
Variants§
ObjectNotFound(Id<ObjectIdMarker>)
The referenced object does not exist.
PathNotFound(VirtualPath)
No object exists at the given path.
NotADirectory(Id<ObjectIdMarker>)
The operation requires a directory, but the object is not one.
NotAFile(Id<ObjectIdMarker>)
The operation requires a file, but the object is not one.
NameAlreadyExists
A sibling object with the same name already exists.
Fields
directory: Id<ObjectIdMarker>The directory that already contains the name.
InvalidName(String)
The string is not a valid object name.
InvalidPath(String)
The string is not a valid virtual path.
InvalidMetadataKey(String)
The string is not a valid metadata key.
CyclicMove(Id<ObjectIdMarker>)
Moving the object into itself or one of its descendants would create a cycle.
CyclicCopy(Id<ObjectIdMarker>)
Copying the object into itself or one of its descendants would recurse forever.
SymlinkLoop(String)
Resolving a symbolic link exceeded the depth cap (a loop).
AttachedObject(Id<ObjectIdMarker>)
The object still has a parent; detach it before attaching elsewhere.
CyclicAttach(Id<ObjectIdMarker>)
Attaching the object beneath itself (or one of its descendants) would create a parent cycle.
RootMove
The root object cannot be moved.
RootDelete
The root object cannot be deleted.
RootDetach
The root object cannot be detached.
NotAuthorized
The current actor is not authorized to perform the operation.
Fields
object: Id<ObjectIdMarker>The object the operation targeted.
actor: Option<Id<ActorIdMarker>>The actor that performed the operation, if any.
Trait Implementations§
impl Eq for Error
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<Error> for MachineError
impl From<Error> for MachineError
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.