pub struct BuiltInHandler {
pub handler_type: HandlerType,
pub content_type: Option<String>,
pub status: Option<u16>,
pub template: Option<String>,
pub data: Option<Value>,
pub file_path: Option<String>,
pub fields: Option<Vec<String>>,
pub redirect_url: Option<String>,
pub custom_handler: Option<String>,
pub headers: Option<HashMap<String, String>>,
}
Expand description
Built-in HTTP handler definition
Fields§
§handler_type: HandlerType
Handler type
content_type: Option<String>
Response content type
status: Option<u16>
Response status code
template: Option<String>
Template content or path
data: Option<Value>
JSON data
file_path: Option<String>
Static file path
fields: Option<Vec<String>>
Form fields (for form handlers)
redirect_url: Option<String>
Redirect URL
custom_handler: Option<String>
Custom handler function name
headers: Option<HashMap<String, String>>
Response headers
Trait Implementations§
Source§impl Clone for BuiltInHandler
impl Clone for BuiltInHandler
Source§fn clone(&self) -> BuiltInHandler
fn clone(&self) -> BuiltInHandler
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 BuiltInHandler
impl Debug for BuiltInHandler
Source§impl<'de> Deserialize<'de> for BuiltInHandler
impl<'de> Deserialize<'de> for BuiltInHandler
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for BuiltInHandler
impl RefUnwindSafe for BuiltInHandler
impl Send for BuiltInHandler
impl Sync for BuiltInHandler
impl Unpin for BuiltInHandler
impl UnwindSafe for BuiltInHandler
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