#[non_exhaustive]pub enum RespondView {
File {
path: String,
csv_records_key: Option<String>,
},
Text {
text: String,
status: Option<u16>,
},
Status {
code: u16,
},
}Expand description
GUI-facing view of one response shape.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
File
Serve a file. The path is resolved against the rule set’s
respond_dir_prefix at request time.
Text
Return a literal text body. status is the response code to use
(defaults to 200 when absent).
Status
Return an empty body with just this status code.
Trait Implementations§
Source§impl Clone for RespondView
impl Clone for RespondView
Source§fn clone(&self) -> RespondView
fn clone(&self) -> RespondView
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 RespondView
impl Debug for RespondView
Auto Trait Implementations§
impl Freeze for RespondView
impl RefUnwindSafe for RespondView
impl Send for RespondView
impl Sync for RespondView
impl Unpin for RespondView
impl UnsafeUnpin for RespondView
impl UnwindSafe for RespondView
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