pub struct TsHttpClient { /* private fields */ }Expand description
Interprets typed HTTP programs as a TypeScript client module.
Nothing is applied and no request is made. Each endpoint is read for what a caller states and what they receive, which is the same program an executing interpretation answers.
Implementations§
Trait Implementations§
Source§impl BytesOutAlg for TsHttpClient
impl BytesOutAlg for TsHttpClient
Source§type Bytes<From> = TsBytesOutput
type Bytes<From> = TsBytesOutput
The raw-byte converter selected for
From.Source§impl Clone for TsHttpClient
impl Clone for TsHttpClient
Source§fn clone(&self) -> TsHttpClient
fn clone(&self) -> TsHttpClient
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TsHttpClient
Source§impl Debug for TsHttpClient
impl Debug for TsHttpClient
Source§impl EmptyOutAlg for TsHttpClient
impl EmptyOutAlg for TsHttpClient
Source§type Empty<From> = TsEmptyOutput
type Empty<From> = TsEmptyOutput
The empty converter selected for
From.Source§impl FileOutAlg for TsHttpClient
impl FileOutAlg for TsHttpClient
Source§type File<From> = TsFileOutput
type File<From> = TsFileOutput
The streamed-file converter selected for
From.Source§impl HandlerAlg for TsHttpClient
impl HandlerAlg for TsHttpClient
Source§impl<Context> HandlerContextAlg<Context> for TsHttpClient
impl<Context> HandlerContextAlg<Context> for TsHttpClient
Source§impl<Handle, Inputs, Args, Transform, Answering, Output> HandlerEndpointAlg<Handle, Inputs, Args, Transform, Output> for TsHttpClientwhere
Inputs: TsInputsAlg,
Transform: OutputKindAlg<Self, Output, Transform = Answering>,
Answering: TsOutputAlg<Output>,
impl<Handle, Inputs, Args, Transform, Answering, Output> HandlerEndpointAlg<Handle, Inputs, Args, Transform, Output> for TsHttpClientwhere
Inputs: TsInputsAlg,
Transform: OutputKindAlg<Self, Output, Transform = Answering>,
Answering: TsOutputAlg<Output>,
Source§fn finish_handler<Handler>(&self, _handler: Handler) -> TsCall
fn finish_handler<Handler>(&self, _handler: Handler) -> TsCall
Interprets a typed first-order handler as a concrete endpoint. Read more
Source§impl HeaderOutAlg for TsHttpClient
impl HeaderOutAlg for TsHttpClient
Source§type Header<Inner, Name> = TsHeaderOutput<Inner, Name>
type Header<Inner, Name> = TsHeaderOutput<Inner, Name>
The converter writing
Name beside the body Inner states.Source§impl HtmlOutAlg for TsHttpClient
impl HtmlOutAlg for TsHttpClient
Source§type Html<From> = TsHtmlOutput
type Html<From> = TsHtmlOutput
The HTML converter selected for
From.Source§impl HttpInputAlg for TsHttpClient
impl HttpInputAlg for TsHttpClient
Source§type Path<I> = TsPathInput<I>
type Path<I> = TsPathInput<I>
The interpreter’s path extractor for
Input.Source§type Query<I> = TsQueryInput<I>
type Query<I> = TsQueryInput<I>
The interpreter’s query extractor for
Input.Source§type Body<I> = TsBodyInput<I>
type Body<I> = TsBodyInput<I>
The interpreter’s request-body extractor for
Input.Source§type Form<I> = TsFormInput<I>
type Form<I> = TsFormInput<I>
The interpreter’s form-encoded request-body extractor for
Input.Source§type Multipart<I> = TsMultipartInput<I>
type Multipart<I> = TsMultipartInput<I>
The interpreter’s extractor for
Input read from a body arriving as parts.Source§type RawBody<I> = TsRawBodyInput<I>
type RawBody<I> = TsRawBodyInput<I>
The interpreter’s unread request-body extractor for
Input.Source§type Header<I> = TsHeaderInput<I>
type Header<I> = TsHeaderInput<I>
The interpreter’s header extractor for
Input. Read moreSource§type Cookie<I> = TsCookieInput<I>
type Cookie<I> = TsCookieInput<I>
The interpreter’s cookie extractor for
Input.Source§type Auth<I> = TsHeaderInput<I>
type Auth<I> = TsHeaderInput<I>
The interpreter’s authentication extractor for
Input.Source§type Context<I> = TsUnstatedInput<I>
type Context<I> = TsUnstatedInput<I>
The interpreter’s endpoint-context extractor for
Input.Source§impl HttpSelectorAlg for TsHttpClient
impl HttpSelectorAlg for TsHttpClient
Source§type Selector = TsSelector
type Selector = TsSelector
The interpreter’s HTTP selector representation.
Source§fn http_method(&self, method: HttpMethod) -> Self::Selector
fn http_method(&self, method: HttpMethod) -> Self::Selector
Interprets a request-method selector.
Source§fn http_prefix(&self, prefix: &RoutePath) -> Self::Selector
fn http_prefix(&self, prefix: &RoutePath) -> Self::Selector
Interprets a path-prefix selector.
Source§impl JsonOutAlg for TsHttpClient
impl JsonOutAlg for TsHttpClient
Source§type Json<From> = TsJsonOutput
type Json<From> = TsJsonOutput
The JSON converter selected for
From.Source§impl RedirectOutAlg for TsHttpClient
impl RedirectOutAlg for TsHttpClient
Source§type Redirect<From> = TsRedirectOutput
type Redirect<From> = TsRedirectOutput
The redirect converter selected for
From.Source§impl ResultOutAlg for TsHttpClient
impl ResultOutAlg for TsHttpClient
Source§type Result<Inner, Error> = TsResultOutput<Inner, Error>
type Result<Inner, Error> = TsResultOutput<Inner, Error>
The converter answering with
Inner on success and with what Error means otherwise.Source§impl RouteAlg for TsHttpClient
impl RouteAlg for TsHttpClient
Source§type Route = TsHttpModule
type Route = TsHttpModule
The interpreter’s composed route representation.
Source§type Selector = TsSelector
type Selector = TsSelector
The selector applied to a route or endpoint.
Source§fn coproduct(&self, left: Self::Route, right: Self::Route) -> Self::Route
fn coproduct(&self, left: Self::Route, right: Self::Route) -> Self::Route
Forms the coproduct of two routes.
Source§impl SelectorAlg for TsHttpClient
impl SelectorAlg for TsHttpClient
Source§impl StatusOutAlg for TsHttpClient
impl StatusOutAlg for TsHttpClient
Source§type Status<Inner, const CODE: u16> = TsStatusOutput<Inner, CODE>
type Status<Inner, const CODE: u16> = TsStatusOutput<Inner, CODE>
The converter answering with
CODE and the body Inner states.Source§impl StreamOutAlg for TsHttpClient
impl StreamOutAlg for TsHttpClient
Source§type Stream<From> = TsStreamOutput
type Stream<From> = TsStreamOutput
The streamed converter selected for
From.Source§impl TextOutAlg for TsHttpClient
impl TextOutAlg for TsHttpClient
Source§type Text<From> = TsTextOutput
type Text<From> = TsTextOutput
The plain-text converter selected for
From.Auto Trait Implementations§
impl Freeze for TsHttpClient
impl RefUnwindSafe for TsHttpClient
impl Send for TsHttpClient
impl Sync for TsHttpClient
impl Unpin for TsHttpClient
impl UnsafeUnpin for TsHttpClient
impl UnwindSafe for TsHttpClient
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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<This> RouteAlgExt<This> for Thiswhere
This: RouteAlg,
impl<This> RouteAlgExt<This> for Thiswhere
This: RouteAlg,
Source§impl<This> ShapeProgramExt<This> for This
impl<This> ShapeProgramExt<This> for This
Source§fn compile_shape<Program>(
&self,
program: Program,
) -> <Program as ShapeProgramAlg<This>>::Tywhere
Program: ShapeProgramAlg<This>,
fn compile_shape<Program>(
&self,
program: Program,
) -> <Program as ShapeProgramAlg<This>>::Tywhere
Program: ShapeProgramAlg<This>,
Folds a declaration with this interpretation.