A constructor for `Error`. Intended for use in custom crypto providers.
(kind: ErrorKind)
| 6 | /// A constructor for `Error`. |
| 7 | /// Intended for use in custom crypto providers. |
| 8 | pub fn new_error(kind: ErrorKind) -> Error { |
| 9 | Error(Box::new(kind)) |
| 10 | } |
| 11 | |
| 12 | /// A type alias for `Result<T, jsonwebtoken::errors::Error>`. |
| 13 | pub type Result<T> = result::Result<T, Error>; |