pub struct HttpTargetBuilder {
route: Option<CompactString>,
version: Option<Option<CompactString>>,
method: Option<HttpMethod>,
execution_pipeline: Option<Option<ExecutionAtom>>,
query_params: Option<CheapVec<CompactString, 0>>,
body_params: Option<CheapVec<CompactString, 0>>,
capture_all_params: Option<bool>,
auto_generated: Option<bool>,
}Expand description
Builder for HttpTarget.
Fields§
§route: Option<CompactString>Route of the endpoint. Note that this will be prefixed with {api_prefix}/{version} (if version is set).
version: Option<Option<CompactString>>The version of the endpoint, if no version is set the endpoint will be accessible from {api_prefix}/{route}.
method: Option<HttpMethod>Method of the endpoint
execution_pipeline: Option<Option<ExecutionAtom>>Establishes the execution pipeline. Note that if no executor is set, the server will try to handle the request internally.
query_params: Option<CheapVec<CompactString, 0>>Sets the accepted query parameters.
body_params: Option<CheapVec<CompactString, 0>>Sets the accepted body parameters.
capture_all_params: Option<bool>Whether to capture all the request’s params. Useful for internal executors and generic trait implementations.
auto_generated: Option<bool>Whether this endpoint has been automatically generated.
Implementations§
Source§impl HttpTargetBuilder
impl HttpTargetBuilder
Sourcepub fn route(&mut self, value: CompactString) -> &mut Self
pub fn route(&mut self, value: CompactString) -> &mut Self
Route of the endpoint. Note that this will be prefixed with {api_prefix}/{version} (if version is set).
Sourcepub fn version(&mut self, value: CompactString) -> &mut Self
pub fn version(&mut self, value: CompactString) -> &mut Self
The version of the endpoint, if no version is set the endpoint will be accessible from {api_prefix}/{route}.
Sourcepub fn method(&mut self, value: HttpMethod) -> &mut Self
pub fn method(&mut self, value: HttpMethod) -> &mut Self
Method of the endpoint
Sourcepub fn execution_pipeline(&mut self, value: ExecutionAtom) -> &mut Self
pub fn execution_pipeline(&mut self, value: ExecutionAtom) -> &mut Self
Establishes the execution pipeline. Note that if no executor is set, the server will try to handle the request internally.
Sourcepub fn query_params(&mut self, value: CheapVec<CompactString, 0>) -> &mut Self
pub fn query_params(&mut self, value: CheapVec<CompactString, 0>) -> &mut Self
Sets the accepted query parameters.
Sourcepub fn body_params(&mut self, value: CheapVec<CompactString, 0>) -> &mut Self
pub fn body_params(&mut self, value: CheapVec<CompactString, 0>) -> &mut Self
Sets the accepted body parameters.
Sourcepub fn capture_all_params(&mut self, value: bool) -> &mut Self
pub fn capture_all_params(&mut self, value: bool) -> &mut Self
Whether to capture all the request’s params. Useful for internal executors and generic trait implementations.
Sourcepub fn auto_generated(&mut self, value: bool) -> &mut Self
pub fn auto_generated(&mut self, value: bool) -> &mut Self
Whether this endpoint has been automatically generated.
Sourcepub fn build(&self) -> Result<HttpTarget, HttpTargetBuilderError>
pub fn build(&self) -> Result<HttpTarget, HttpTargetBuilderError>
Sourcefn create_empty() -> Self
fn create_empty() -> Self
Create an empty builder, with all fields set to None or PhantomData.
Trait Implementations§
Source§impl Clone for HttpTargetBuilder
impl Clone for HttpTargetBuilder
Source§fn clone(&self) -> HttpTargetBuilder
fn clone(&self) -> HttpTargetBuilder
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for HttpTargetBuilder
impl !UnwindSafe for HttpTargetBuilder
impl Freeze for HttpTargetBuilder
impl Send for HttpTargetBuilder
impl Sync for HttpTargetBuilder
impl Unpin for HttpTargetBuilder
impl UnsafeUnpin for HttpTargetBuilder
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 more§impl<D> OwoColorize for D
impl<D> OwoColorize for D
§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg] or
a color-specific method, such as [OwoColorize::green], Read more§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg] or
a color-specific method, such as [OwoColorize::on_yellow], Read more