Struct CallAll
struct CallAll<Svc, S> { ... }
where
Svc: Service<<S as >::Item>,
S: Stream
This is a Stream of responses resulting from calling the wrapped Service for each
request received on the wrapped Stream.
# use ;
# use Cell;
# use Error;
# use Rc;
#
use ;
use StreamExt;
use mpsc;
use Service;
use ServiceExt;
// First, we need to have a Service to process our requests.
;
async
Implementations
impl<Svc, S> CallAll<Svc, S>
fn new(service: Svc, stream: S) -> CallAll<Svc, S>Create new
CallAllcombinator.Each request yielded by
streamis passed tosvc, and the resulting responses are yielded in the same order by the implementation ofStreamforCallAll.fn into_inner(self: Self) -> SvcExtract the wrapped
Service.Panics
Panics if
take_servicewas already called.fn take_service(self: Pin<&mut Self>) -> SvcExtract the wrapped
Service.This
CallAllcan no longer be used after this function has been called.Panics
Panics if
take_servicewas already called.fn unordered(self: Self) -> CallAllUnordered<Svc, S>Return responses as they are ready, regardless of the initial order.
This function must be called before the stream is polled.
Panics
Panics if
pollwas called.
impl<'__pin, Svc, S> Unpin for CallAll<Svc, S>
impl<K, S, E, D> Discover for CallAll<Svc, S>
fn poll_discover(self: Pin<&mut D>, cx: &mut Context<'_>) -> Poll<Option<Result<<D as TryStream>::Ok, <D as TryStream>::Error>>>
impl<S> TryStreamExt for CallAll<Svc, S>
impl<S, T, E> TryStream for CallAll<Svc, S>
fn try_poll_next(self: Pin<&mut S>, cx: &mut Context<'_>) -> Poll<Option<Result<<S as TryStream>::Ok, <S as TryStream>::Error>>>
impl<Svc, S> Debug for CallAll<Svc, S>
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl<Svc, S> Freeze for CallAll<Svc, S>
impl<Svc, S> RefUnwindSafe for CallAll<Svc, S>
impl<Svc, S> Send for CallAll<Svc, S>
impl<Svc, S> Stream for CallAll<Svc, S>
fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<<Self as >::Item>>
impl<Svc, S> Sync for CallAll<Svc, S>
impl<Svc, S> UnsafeUnpin for CallAll<Svc, S>
impl<Svc, S> UnwindSafe for CallAll<Svc, S>
impl<T> Any for CallAll<Svc, S>
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for CallAll<Svc, S>
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for CallAll<Svc, S>
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> From for CallAll<Svc, S>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Instrument for CallAll<Svc, S>
impl<T> StreamExt for CallAll<Svc, S>
impl<T> WithSubscriber for CallAll<Svc, S>
impl<T, U> Into for CallAll<Svc, S>
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for CallAll<Svc, S>
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for CallAll<Svc, S>
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>