pub enum Route {
Get {
route: String,
trigger: Option<String>,
target: Selector,
strategy: SwapStrategy,
},
Post {
route: String,
trigger: Option<String>,
target: Selector,
strategy: SwapStrategy,
},
Put {
route: String,
trigger: Option<String>,
target: Selector,
strategy: SwapStrategy,
},
Delete {
route: String,
trigger: Option<String>,
target: Selector,
strategy: SwapStrategy,
},
Patch {
route: String,
trigger: Option<String>,
target: Selector,
strategy: SwapStrategy,
},
}Expand description
HTTP route definition with target and swap strategy.
Represents different HTTP methods with associated route paths, event triggers, target selectors, and swap strategies for dynamic content updates.
Variants§
Get
HTTP GET request.
Fields
§
strategy: SwapStrategyHow to swap the response content.
Post
HTTP POST request.
Fields
§
strategy: SwapStrategyHow to swap the response content.
Put
HTTP PUT request.
Fields
§
strategy: SwapStrategyHow to swap the response content.
Delete
HTTP DELETE request.
Fields
§
strategy: SwapStrategyHow to swap the response content.
Patch
HTTP PATCH request.
Trait Implementations§
Source§impl Arbitrary for Route
impl Arbitrary for Route
Source§type Parameters = ()
type Parameters = ()
The type of parameters that
arbitrary_with accepts for configuration
of the generated Strategy. Parameters must implement Default.Source§type Strategy = BoxedStrategy<Route>
type Strategy = BoxedStrategy<Route>
The type of
Strategy used to generate values of type Self.Source§fn arbitrary_with(
args_shared: <Self as Arbitrary>::Parameters,
) -> Self::Strategy
fn arbitrary_with( args_shared: <Self as Arbitrary>::Parameters, ) -> Self::Strategy
Source§impl<'de> Deserialize<'de> for Route
impl<'de> Deserialize<'de> for Route
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
impl Eq for Route
impl StructuralPartialEq for Route
Auto Trait Implementations§
impl Freeze for Route
impl RefUnwindSafe for Route
impl Send for Route
impl Sync for Route
impl Unpin for Route
impl UnsafeUnpin for Route
impl UnwindSafe for Route
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