pub struct ErrorPageHandler { /* private fields */ }Expand description
Handler for generating error responses
Implementations§
Source§impl ErrorPageHandler
impl ErrorPageHandler
Sourcepub fn with_templates(templates: ErrorTemplates) -> Self
pub fn with_templates(templates: ErrorTemplates) -> Self
Create with custom templates
Sourcepub fn templates_mut(&mut self) -> &mut ErrorTemplates
pub fn templates_mut(&mut self) -> &mut ErrorTemplates
Get mutable templates
Sourcepub fn templates(&self) -> &ErrorTemplates
pub fn templates(&self) -> &ErrorTemplates
Get templates reference
Sourcepub fn has_custom(&self, status_code: u16) -> bool
pub fn has_custom(&self, status_code: u16) -> bool
Check if custom template exists
Trait Implementations§
Source§impl Clone for ErrorPageHandler
impl Clone for ErrorPageHandler
Source§fn clone(&self) -> ErrorPageHandler
fn clone(&self) -> ErrorPageHandler
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ErrorPageHandler
impl Debug for ErrorPageHandler
Auto Trait Implementations§
impl Freeze for ErrorPageHandler
impl RefUnwindSafe for ErrorPageHandler
impl Send for ErrorPageHandler
impl Sync for ErrorPageHandler
impl Unpin for ErrorPageHandler
impl UnsafeUnpin for ErrorPageHandler
impl UnwindSafe for ErrorPageHandler
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