pub struct Route {
pub dynamic: Cow<'static, str>,
pub method: Cow<'static, str>,
pub body: Value,
pub response: Value,
pub path: Cow<'static, str>,
}Expand description
Describes an HTTP route produced or consumed by the agent.
Fields§
§dynamic: Cow<'static, str>Whether the route segment is dynamic (e.g. "/items/{id}").
method: Cow<'static, str>HTTP method ("GET", "POST", …).
body: ValueExample request body as a JSON value.
response: ValueExample response body as a JSON value.
path: Cow<'static, str>Route path.
Trait Implementations§
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