#[non_exhaustive]pub struct Error {}
Expand description
Error type for Scotch functions.
Error handling
Scotch doesn’t provide a way to differentiate errors. When an error is returned by a function, Scotch will typically already have printed an error message on standard error.
Some errors are hidden from these bindings as panics, that is the Rust function panics if Scotch returns an error. This should only happen when there is a mismatch between Scotch’s target architecture and its configuration (e.g. type size mismatch). These checks are enabled when Scotch is built with debug assertions enabled.
Trait Implementations§
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)>
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()