pub struct ApplicationError {
pub kind: ApplicationErrorKind,
pub message: String,
}
Expand description
Encodes information about errors encountered within auto-generated code or within the user-implemented service handlers.
Fields§
§kind: ApplicationErrorKind
Specific Thrift application error kind.
If a specific ApplicationErrorKind
does not apply use
ApplicationErrorKind::Unknown
.
message: String
Human-readable error message.
Implementations§
Source§impl ApplicationError
impl ApplicationError
Sourcepub fn new<S: Into<String>>(
kind: ApplicationErrorKind,
message: S,
) -> ApplicationError
pub fn new<S: Into<String>>( kind: ApplicationErrorKind, message: S, ) -> ApplicationError
Convenience constructor to create a new ApplicationError
instance.
Trait Implementations§
Source§impl Debug for ApplicationError
impl Debug for ApplicationError
Source§impl Display for ApplicationError
impl Display for ApplicationError
Source§impl From<ApplicationError> for Error
impl From<ApplicationError> for Error
Source§fn from(e: ApplicationError) -> Self
fn from(e: ApplicationError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ApplicationError
impl RefUnwindSafe for ApplicationError
impl Send for ApplicationError
impl Sync for ApplicationError
impl Unpin for ApplicationError
impl UnwindSafe for ApplicationError
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