pub enum t18 {
E0,
E1,
E2,
E3(String),
E4(String),
E5(String),
E6(String),
E7(String),
E8,
E9,
E10(String),
}Expand description
t18 = AppError. Central error type for CochranBlock. Why: single source for status codes and display.
Variants§
Implementations§
Source§impl t18
impl t18
Sourcepub fn status_code(&self) -> u16
pub fn status_code(&self) -> u16
Why: HTTP handlers need status codes without matching on variants.
Sourcepub fn public_message(&self) -> &'static str
pub fn public_message(&self) -> &'static str
Why: Public API returns safe messages; internal details stay in Debug.
Trait Implementations§
Source§impl Error for t18
impl Error for t18
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()
Auto Trait Implementations§
impl Freeze for t18
impl RefUnwindSafe for t18
impl Send for t18
impl Sync for t18
impl Unpin for t18
impl UnsafeUnpin for t18
impl UnwindSafe for t18
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