pub struct MapResponse<S, F> { /* private fields */ }Expand description
map_response 返回的服务。
Implementations§
Source§impl<S, F> MapResponse<S, F>
impl<S, F> MapResponse<S, F>
Sourcepub fn new(service: S, f: F) -> Self
pub fn new(service: S, f: F) -> Self
创建一个新的 MapResponse 服务。
Trait Implementations§
Source§impl<S: Clone, F: Clone> Clone for MapResponse<S, F>
impl<S: Clone, F: Clone> Clone for MapResponse<S, F>
Source§fn clone(&self) -> MapResponse<S, F>
fn clone(&self) -> MapResponse<S, F>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<S, F> Debug for MapResponse<S, F>where
S: Debug,
impl<S, F> Debug for MapResponse<S, F>where
S: Debug,
Source§impl<S, F, Req, Res> Service<Req> for MapResponse<S, F>
impl<S, F, Req, Res> Service<Req> for MapResponse<S, F>
impl<S: Copy, F: Copy> Copy for MapResponse<S, F>
Auto Trait Implementations§
impl<S, F> Freeze for MapResponse<S, F>
impl<S, F> RefUnwindSafe for MapResponse<S, F>where
S: RefUnwindSafe,
F: RefUnwindSafe,
impl<S, F> Send for MapResponse<S, F>
impl<S, F> Sync for MapResponse<S, F>
impl<S, F> Unpin for MapResponse<S, F>
impl<S, F> UnwindSafe for MapResponse<S, F>where
S: UnwindSafe,
F: 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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<S, Req> ServiceExt<Req> for S
impl<S, Req> ServiceExt<Req> for S
Source§fn map_result<F, Res, Err>(self, f: F) -> MapResult<Self, F>
fn map_result<F, Res, Err>(self, f: F) -> MapResult<Self, F>
将此服务返回的结果映射为其他值。 Read more
Source§fn map_response<F, Res>(self, f: F) -> MapResponse<Self, F>
fn map_response<F, Res>(self, f: F) -> MapResponse<Self, F>
将此服务返回的响应映射为其他值。 Read more
Source§fn map_request<F, R>(self, f: F) -> MapRequest<Self, F>
fn map_request<F, R>(self, f: F) -> MapRequest<Self, F>
将发送给此服务的请求映射为其他值。 Read more