#[derive(FromError)]
Expand description
Derives the kanin::error::FromError
trait for a type. This only works under specific circumstances.
If the type is a tuple struct, it must have a single member that also implements FromError.
If the type is a struct with named fields, it must have exactly one field that also implements FromError, except if the struct’s name contains InternalError or InvalidRequest, in which case FromError will be implemented specially, by assuming the structure of the type to match the expected structure.
The expected structure is:
struct InvalidRequest {
error: String,
}
struct InternalError {
/// The source is the app ID of the service in which the error originated.
source: String,
error: String,
}