pub struct CannedRequestSerializer { /* private fields */ }
Available on crate features
client
and test-util
only.Expand description
Test SerializeRequest
that returns a canned request.
Implementations§
source§impl CannedRequestSerializer
impl CannedRequestSerializer
sourcepub fn success(request: HttpRequest) -> Self
pub fn success(request: HttpRequest) -> Self
Create a new CannedRequestSerializer
with a successful canned request.
sourcepub fn failure(error: BoxError) -> Self
pub fn failure(error: BoxError) -> Self
Create a new CannedRequestSerializer
with a canned error.
Trait Implementations§
source§impl Debug for CannedRequestSerializer
impl Debug for CannedRequestSerializer
source§impl Default for CannedRequestSerializer
impl Default for CannedRequestSerializer
source§fn default() -> CannedRequestSerializer
fn default() -> CannedRequestSerializer
Returns the “default value” for a type. Read more
source§impl RuntimePlugin for CannedRequestSerializer
impl RuntimePlugin for CannedRequestSerializer
source§fn config(&self) -> Option<FrozenLayer>
fn config(&self) -> Option<FrozenLayer>
source§fn runtime_components(
&self,
current_components: &RuntimeComponentsBuilder
) -> Cow<'_, RuntimeComponentsBuilder>
fn runtime_components( &self, current_components: &RuntimeComponentsBuilder ) -> Cow<'_, RuntimeComponentsBuilder>
Returns a
RuntimeComponentsBuilder
to incorporate into the final runtime components. Read moresource§impl SerializeRequest for CannedRequestSerializer
impl SerializeRequest for CannedRequestSerializer
source§fn serialize_input(
&self,
_input: Input,
_cfg: &mut ConfigBag
) -> Result<HttpRequest, BoxError>
fn serialize_input( &self, _input: Input, _cfg: &mut ConfigBag ) -> Result<HttpRequest, BoxError>
Serializes the input into an HTTP request. Read more
Auto Trait Implementations§
impl !Freeze for CannedRequestSerializer
impl RefUnwindSafe for CannedRequestSerializer
impl Send for CannedRequestSerializer
impl Sync for CannedRequestSerializer
impl Unpin for CannedRequestSerializer
impl UnwindSafe for CannedRequestSerializer
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> 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>
Creates a shared type from an unshared type.