pub struct RocketHandlerImpl<Context> { /* private fields */ }Expand description
Interprets typed HTTP programs as executable Rocket routes.
Implementations§
Source§impl<Context> RocketHandlerImpl<Context>
impl<Context> RocketHandlerImpl<Context>
Trait Implementations§
Source§impl<Context> BytesOutAlg for RocketHandlerImpl<Context>
impl<Context> BytesOutAlg for RocketHandlerImpl<Context>
Source§type Bytes<From> = RocketBytesOutput
type Bytes<From> = RocketBytesOutput
From.Source§impl<Context> EmptyOutAlg for RocketHandlerImpl<Context>
impl<Context> EmptyOutAlg for RocketHandlerImpl<Context>
Source§type Empty<From> = RocketEmptyOutput
type Empty<From> = RocketEmptyOutput
From.Source§impl<Context> FileOutAlg for RocketHandlerImpl<Context>
impl<Context> FileOutAlg for RocketHandlerImpl<Context>
Source§type File<From> = RocketFileOutput
type File<From> = RocketFileOutput
From.Source§impl<Context> HandlerAlg for RocketHandlerImpl<Context>
impl<Context> HandlerAlg for RocketHandlerImpl<Context>
Source§type Endpoint = RocketEndpoint
type Endpoint = RocketEndpoint
Source§impl<Context> HandlerContextAlg<Context> for RocketHandlerImpl<Context>
impl<Context> HandlerContextAlg<Context> for RocketHandlerImpl<Context>
Source§impl<Context, Inputs, Args, Transform, Answering, Output> HandlerEndpointAlg<Arc<Context>, Inputs, Args, Transform, Output> for RocketHandlerImpl<Context>where
Context: Send + Sync + 'static,
Inputs: RocketInputsAlg<Args> + Send + 'static,
Args: Send + 'static,
Output: Send + 'static,
Transform: OutputKindAlg<Self, Output, Transform = Answering> + Send + 'static,
Answering: OutputAlg<Output, Output = RocketAnswer>,
impl<Context, Inputs, Args, Transform, Answering, Output> HandlerEndpointAlg<Arc<Context>, Inputs, Args, Transform, Output> for RocketHandlerImpl<Context>where
Context: Send + Sync + 'static,
Inputs: RocketInputsAlg<Args> + Send + 'static,
Args: Send + 'static,
Output: Send + 'static,
Transform: OutputKindAlg<Self, Output, Transform = Answering> + Send + 'static,
Answering: OutputAlg<Output, Output = RocketAnswer>,
Source§fn finish_handler<Handler>(
&self,
handler: Handler,
) -> <Self as HandlerAlg>::Endpointwhere
Handler: OperationAlg + ApplyAlg<Arc<Context>, Args, Output = Output> + Send + Sync + 'static,
fn finish_handler<Handler>(
&self,
handler: Handler,
) -> <Self as HandlerAlg>::Endpointwhere
Handler: OperationAlg + ApplyAlg<Arc<Context>, Args, Output = Output> + Send + Sync + 'static,
Source§impl<Context> HeaderOutAlg for RocketHandlerImpl<Context>
impl<Context> HeaderOutAlg for RocketHandlerImpl<Context>
Source§type Header<Inner, Name> = RocketHeaderOutput<Inner, Name>
type Header<Inner, Name> = RocketHeaderOutput<Inner, Name>
Name beside the body Inner states.Source§impl<Context> HtmlOutAlg for RocketHandlerImpl<Context>
impl<Context> HtmlOutAlg for RocketHandlerImpl<Context>
Source§type Html<From> = RocketHtmlOutput
type Html<From> = RocketHtmlOutput
From.Source§impl<Context> HttpInputAlg for RocketHandlerImpl<Context>
impl<Context> HttpInputAlg for RocketHandlerImpl<Context>
Source§type Path<I> = RocketPathInput<I>
type Path<I> = RocketPathInput<I>
Input.Source§type Query<I> = RocketQueryInput<I>
type Query<I> = RocketQueryInput<I>
Input.Source§type Body<I> = RocketBodyInput<I>
type Body<I> = RocketBodyInput<I>
Input.Source§type Form<I> = RocketFormInput<I>
type Form<I> = RocketFormInput<I>
Input.Source§type Multipart<I> = RocketMultipartInput<I>
type Multipart<I> = RocketMultipartInput<I>
Input read from a body arriving as parts.Source§type RawBody<I> = RocketRawBodyInput<I>
type RawBody<I> = RocketRawBodyInput<I>
Input.Source§type Header<I> = RocketHeaderInput<I>
type Header<I> = RocketHeaderInput<I>
Input. Read moreSource§type Cookie<I> = RocketCookieInput<I>
type Cookie<I> = RocketCookieInput<I>
Input.Source§type Auth<I> = RocketHeaderInput<I>
type Auth<I> = RocketHeaderInput<I>
Input.Source§type Context<I> = RocketHeadInput<I>
type Context<I> = RocketHeadInput<I>
Input.Source§impl<Context> HttpSelectorAlg for RocketHandlerImpl<Context>
impl<Context> HttpSelectorAlg for RocketHandlerImpl<Context>
Source§type Selector = RocketSelector
type Selector = RocketSelector
Source§fn http_method(&self, method: HttpMethod) -> Self::Selector
fn http_method(&self, method: HttpMethod) -> Self::Selector
Source§fn http_prefix(&self, prefix: &RoutePath) -> Self::Selector
fn http_prefix(&self, prefix: &RoutePath) -> Self::Selector
Source§impl<Context> JsonOutAlg for RocketHandlerImpl<Context>
impl<Context> JsonOutAlg for RocketHandlerImpl<Context>
Source§type Json<From> = RocketJsonOutput
type Json<From> = RocketJsonOutput
From.Source§impl<Context> RedirectOutAlg for RocketHandlerImpl<Context>
impl<Context> RedirectOutAlg for RocketHandlerImpl<Context>
Source§type Redirect<From> = RocketRedirectOutput
type Redirect<From> = RocketRedirectOutput
From.Source§impl<Context> ResultOutAlg for RocketHandlerImpl<Context>
impl<Context> ResultOutAlg for RocketHandlerImpl<Context>
Source§type Result<Inner, Error> = RocketResultOutput<Inner, Error>
type Result<Inner, Error> = RocketResultOutput<Inner, Error>
Inner on success and with what Error means otherwise.Source§impl<Context> RouteAlg for RocketHandlerImpl<Context>
impl<Context> RouteAlg for RocketHandlerImpl<Context>
Source§type Route = RocketRoute
type Route = RocketRoute
Source§type Selector = RocketSelector
type Selector = RocketSelector
Source§type Endpoint = RocketEndpoint
type Endpoint = RocketEndpoint
Source§fn coproduct(&self, left: Self::Route, right: Self::Route) -> Self::Route
fn coproduct(&self, left: Self::Route, right: Self::Route) -> Self::Route
Source§impl<Context> SelectorAlg for RocketHandlerImpl<Context>
impl<Context> SelectorAlg for RocketHandlerImpl<Context>
Source§impl<Context> StatusOutAlg for RocketHandlerImpl<Context>
impl<Context> StatusOutAlg for RocketHandlerImpl<Context>
Source§type Status<Inner, const CODE: u16> = RocketStatusOutput<Inner, CODE>
type Status<Inner, const CODE: u16> = RocketStatusOutput<Inner, CODE>
CODE and the body Inner states.Source§impl<Context> StreamOutAlg for RocketHandlerImpl<Context>
impl<Context> StreamOutAlg for RocketHandlerImpl<Context>
Source§type Stream<From> = RocketStreamOutput
type Stream<From> = RocketStreamOutput
From.Source§impl<Context> TextOutAlg for RocketHandlerImpl<Context>
impl<Context> TextOutAlg for RocketHandlerImpl<Context>
Source§type Text<From> = RocketTextOutput
type Text<From> = RocketTextOutput
From.Auto Trait Implementations§
impl<Context> Freeze for RocketHandlerImpl<Context>
impl<Context> RefUnwindSafe for RocketHandlerImpl<Context>where
Arc<Context>: RefUnwindSafe,
impl<Context> Send for RocketHandlerImpl<Context>
impl<Context> Sync for RocketHandlerImpl<Context>
impl<Context> Unpin for RocketHandlerImpl<Context>
impl<Context> UnsafeUnpin for RocketHandlerImpl<Context>where
Arc<Context>: UnsafeUnpin,
impl<Context> UnwindSafe for RocketHandlerImpl<Context>where
Arc<Context>: UnwindSafe,
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
impl<_INNER> HttpApiAlg for _INNERwhere
_INNER: HandlerAlg + HttpInputAlg + HttpRouteAlg<Endpoint = <_INNER as HandlerAlg>::Endpoint> + RouteAlg,
Source§impl<This> HttpProgramExt<This> for This
impl<This> HttpProgramExt<This> for This
Source§fn compile_http<Program>(
&self,
program: Program,
) -> <Program as HttpProgramAlg<This>>::Routewhere
Program: HttpProgramAlg<This>,
fn compile_http<Program>(
&self,
program: Program,
) -> <Program as HttpProgramAlg<This>>::Routewhere
Program: HttpProgramAlg<This>,
Compiles a named HTTP program with this interpreter.
impl<_INNER> HttpRouteAlg for _INNERwhere
_INNER: HttpSelectorAlg<Selector = <_INNER as SelectorAlg>::Selector> + RouteAlg<Selector = <_INNER as SelectorAlg>::Selector> + SelectorAlg,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoCollection<T> for T
impl<T> IntoCollection<T> for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi Quirk value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);