pub trait RouteSpec {
type Kind;
type Request: RouteRequestImpl<HeaderSlot = Self::HeaderSlot, RawHeaders = Self::RawHeaders, RawParams = Self::RawParams> + for<'req> RouteRequestImpl<Params<'req> = Self::Params<'req>, Headers<'req> = Self::Headers<'req>>;
type Params<'req>: RouteParams<'req, Raw = Self::RawParams>;
type RawParams: RawRouteParams<Captures = Self::Captures>;
type Headers<'req>;
type RawHeaders: Default;
type HeaderSlot: Copy;
type Response<'req>: Shape<'req>;
type AsyncResponse: OwnedShape;
type Stream: 'static;
type ParsedBody<'req>;
type Captures;
Show 6 associated constants and 2 methods
const STATIC_RESPONSE: bool = false;
const RESPONSE_BODY_KIND: ResponseKind = sark_core::http::body_kind::ResponseKind::Inline;
const BODY_POLICY: BodyPolicy = <Self::Request as RouteRequestImpl>::BODY_POLICY;
const MAX_BODY: usize = _;
const EMIT_DATE: bool = true;
const EMIT_SERVER: bool = true;
// Required methods
fn parse_body<'req>(raw: &'req [u8]) -> Result<Self::ParsedBody<'req>>;
fn from_captures<P: PathProbe>(
path: &P,
captures: Self::Captures,
) -> Option<Self::RawParams>;
}Provided Associated Constants§
const STATIC_RESPONSE: bool = false
const RESPONSE_BODY_KIND: ResponseKind = sark_core::http::body_kind::ResponseKind::Inline
const BODY_POLICY: BodyPolicy = <Self::Request as RouteRequestImpl>::BODY_POLICY
const MAX_BODY: usize = _
const EMIT_DATE: bool = true
const EMIT_SERVER: bool = true
Required Associated Types§
type Kind
type Request: RouteRequestImpl<HeaderSlot = Self::HeaderSlot, RawHeaders = Self::RawHeaders, RawParams = Self::RawParams> + for<'req> RouteRequestImpl<Params<'req> = Self::Params<'req>, Headers<'req> = Self::Headers<'req>>
type Params<'req>: RouteParams<'req, Raw = Self::RawParams>
type RawParams: RawRouteParams<Captures = Self::Captures>
type Headers<'req>
type RawHeaders: Default
type HeaderSlot: Copy
type Response<'req>: Shape<'req>
type AsyncResponse: OwnedShape
type Stream: 'static
type ParsedBody<'req>
type Captures
Required Methods§
fn parse_body<'req>(raw: &'req [u8]) -> Result<Self::ParsedBody<'req>>
fn from_captures<P: PathProbe>( path: &P, captures: Self::Captures, ) -> Option<Self::RawParams>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".