pub enum UserError {
NotFound(String),
AlreadyExists(String),
ValidationError(String),
InvalidEmail(String),
DatabaseError(String),
ActorCommunicationError(String),
}Expand description
Errors that can occur during user operations.
This error type is used both by the client (UserClient) and internally by the User entity’s lifecycle hooks.
Variants§
NotFound(String)
The requested user was not found.
AlreadyExists(String)
A user with the same unique identifier (e.g., email) already exists.
ValidationError(String)
The user data provided is invalid.
InvalidEmail(String)
Invalid email format (entity-level validation)
DatabaseError(String)
An underlying database error occurred.
ActorCommunicationError(String)
An error occurred while communicating with the actor system.
Trait Implementations§
Source§impl Error for UserError
impl Error for UserError
1.30.0 · 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 Freeze for UserError
impl RefUnwindSafe for UserError
impl Send for UserError
impl Sync for UserError
impl Unpin for UserError
impl UnwindSafe for UserError
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