#[non_exhaustive]pub struct Error {
pub error_code: i32,
pub error_msg: String,
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.error_code: i32§error_msg: StringImplementations§
Source§impl Error
impl Error
pub fn create(code: i32, msg: &str) -> Self
pub fn new() -> Self
pub fn error_code(self, code: i32) -> Self
pub fn error_msg(self, msg: String) -> Self
pub fn NotFound() -> Error
pub fn ErrorNoPermission() -> Error
pub fn ErrorInternalServer() -> Error
pub fn ErrorRedisConnectError() -> Error
pub fn ErrorStartTransactionFailed() -> Error
pub fn ErrorCommitTransactionFailed() -> Error
pub fn ErrorParsingPrivateKey() -> Error
pub fn NotFoundPrivateKey() -> Error
pub fn ErrorCreateFailed() -> Error
pub fn ErrorStaffRepeatCreate() -> Error
pub fn ErrorAMSCreateStaffFailed() -> Error
pub fn ErrorUpdateFailed() -> Error
pub fn ErrorAMSUpdateStaffFailed() -> Error
pub fn ErrorDeleteFailed() -> Error
pub fn ErrorDeleteStaffCardFailed() -> Error
pub fn ErrorDeleteStaffFailed() -> Error
pub fn ErrorQueryFailed() -> Error
pub fn ErrorRemoteRequestFailed() -> Error
pub fn ErrorAMSDeviceStatusInterface() -> Error
pub fn ErrorAMSSyncCommandTypeInterface() -> Error
pub fn ErrorAMSDeviceSyncInterface() -> Error
pub fn ErrorAMSDeviceTypeSyncInterface() -> Error
pub fn ErrorAMSEventTypeSyncInterface() -> Error
pub fn ErrorAMSPermissionSyncInterface() -> Error
pub fn ErrorAMSStatusTypeSyncInterface() -> Error
pub fn ErrorAMSPersonAuthorFailed() -> Error
pub fn ErrorAMSPersonAuthorRepeat() -> Error
pub fn ErrorAMSPersonAuthorRoleFailed() -> Error
pub fn ErrorAMSDeviceCommandExecution() -> Error
pub fn ErrorCardRepeatAssign() -> Error
pub fn ErrorCardRepeatStaff() -> Error
pub fn ErrorAMSUnbindCardFailed() -> Error
pub fn ErrorQRCodeGenerateWithoutAuth() -> Error
pub fn ErrorPermissionExpiryConfigMissing() -> Error
pub fn ErrorCardNumberDuplicate() -> Error
pub fn ErrorDoorOpeningTimeRestricted() -> Error
pub fn ErrorPersonValidTimeNotSet() -> Error
pub fn ErrorPersonValidTimeInvalid() -> Error
pub fn ErrorPersonNotFound() -> Error
pub fn ErrorAMSDeletePermissionFailed() -> Error
pub fn ErrorDepartmentNameRepeat() -> Error
pub fn ErrorParentNodeNotExist() -> Error
pub fn ErrorDepartmentDisable() -> Error
pub fn ErrorDataNotFound() -> Error
pub fn ErrorPostHasStaff() -> Error
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Error
impl<'de> Deserialize<'de> for Error
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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)>
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<FromUtf8Error> for Error
impl From<FromUtf8Error> for Error
Source§fn from(arg: FromUtf8Error) -> Self
fn from(arg: FromUtf8Error) -> Self
Converts to this type from the input type.
Source§impl From<ParseIntError> for Error
impl From<ParseIntError> for Error
Source§fn from(arg: ParseIntError) -> Self
fn from(arg: ParseIntError) -> Self
Converts to this type from the input type.
Source§impl From<RedisError> for Error
impl From<RedisError> for Error
Source§fn from(arg: RedisError) -> Self
fn from(arg: RedisError) -> Self
Converts to this type from the input type.
Source§impl From<ValidationErrors> for Error
impl From<ValidationErrors> for Error
Source§fn from(arg: ValidationErrors) -> Self
fn from(arg: ValidationErrors) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin 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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ValidateIp for Twhere
T: ToString,
impl<T> ValidateIp for Twhere
T: ToString,
Source§fn validate_ipv4(&self) -> bool
fn validate_ipv4(&self) -> bool
Validates whether the given string is an IP V4
Source§fn validate_ipv6(&self) -> bool
fn validate_ipv6(&self) -> bool
Validates whether the given string is an IP V6
Source§fn validate_ip(&self) -> bool
fn validate_ip(&self) -> bool
Validates whether the given string is an IP