pub enum GameDatabaseError {
ConnectionFailed {
msg: String,
},
ForeignKeyViolation {
msg: String,
},
MigrationsFailed {
msg: String,
},
MissingConnection,
NotFound,
Other {
msg: String,
},
UniqueConstraintViolation {
msg: String,
},
}Variants§
ConnectionFailed
ForeignKeyViolation
MigrationsFailed
MissingConnection
NotFound
Other
UniqueConstraintViolation
Implementations§
Source§impl GameDatabaseError
impl GameDatabaseError
pub fn connection_failed(msg: &str) -> Self
pub fn foreign_key_violation(msg: &str) -> Self
pub fn migrations_failed(msg: &str) -> Self
pub fn missing_connection() -> Self
pub fn not_found() -> Self
pub fn other(msg: &str) -> Self
pub fn unique_constraint_violation(msg: &str) -> Self
pub fn is_connection_failed(&self) -> bool
pub fn is_foreign_key_violation(&self) -> bool
pub fn is_migrations_failed(&self) -> bool
pub fn is_missing_connection(&self) -> bool
pub fn is_not_found(&self) -> bool
pub fn is_other(&self) -> bool
pub fn is_unique_constraint_violation(&self) -> bool
Trait Implementations§
Source§impl Debug for GameDatabaseError
impl Debug for GameDatabaseError
Source§impl Display for GameDatabaseError
impl Display for GameDatabaseError
Source§impl Error for GameDatabaseError
impl Error for GameDatabaseError
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()
Source§impl From<GameDatabaseError> for GameError
impl From<GameDatabaseError> for GameError
Source§fn from(source: GameDatabaseError) -> Self
fn from(source: GameDatabaseError) -> Self
Converts to this type from the input type.
Source§impl From<GameDatabaseError> for GameRepositoryError
impl From<GameDatabaseError> for GameRepositoryError
Source§fn from(source: GameDatabaseError) -> Self
fn from(source: GameDatabaseError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for GameDatabaseError
impl RefUnwindSafe for GameDatabaseError
impl Send for GameDatabaseError
impl Sync for GameDatabaseError
impl Unpin for GameDatabaseError
impl UnwindSafe for GameDatabaseError
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
Source§impl<T> IntoSql for T
impl<T> IntoSql for T
Source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
Convert
self to an expression for Diesel’s query builder. Read moreSource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
Convert
&self to an expression for Diesel’s query builder. Read more