pub enum MaintenanceResponse {
Text(String),
Json(Value),
Html(String),
Custom {
status_code: ElifStatusCode,
content_type: String,
body: Vec<u8>,
},
File(String),
}
Expand description
Maintenance mode response type
Variants§
Text(String)
Simple text response
Json(Value)
JSON response with error details
Html(String)
HTML response (e.g., maintenance page)
Custom
Custom response with status code and body
File(String)
Load response from file
Implementations§
Source§impl MaintenanceResponse
impl MaintenanceResponse
Sourcepub async fn to_elif_response(&self) -> ElifResponse
pub async fn to_elif_response(&self) -> ElifResponse
Convert to ElifResponse
Trait Implementations§
Source§impl Clone for MaintenanceResponse
impl Clone for MaintenanceResponse
Source§fn clone(&self) -> MaintenanceResponse
fn clone(&self) -> MaintenanceResponse
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 MaintenanceResponse
impl Debug for MaintenanceResponse
Auto Trait Implementations§
impl Freeze for MaintenanceResponse
impl RefUnwindSafe for MaintenanceResponse
impl Send for MaintenanceResponse
impl Sync for MaintenanceResponse
impl Unpin for MaintenanceResponse
impl UnwindSafe for MaintenanceResponse
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