pub struct WireDriver {
pub provider: &'static str,
/* private fields */
}Available on crate feature
test-utils and not (target_os=unknown and WebAssembly) only.Expand description
One provider’s full streaming pipeline over scripted wire chunks.
The closure builds a fresh provider client over a scripted HTTP double
(SequencedStreamingHttpClient), opens CompletionModel::stream, drains
it, and returns everything the consumer observed.
Fields§
§provider: &'static strStable descriptor name of the provider under test.
Implementations§
Source§impl WireDriver
impl WireDriver
Sourcepub fn new(
provider: &'static str,
drive: impl Fn(WireChunks) -> BoxFuture<'static, Result<DrainedStream, CompletionError>> + Send + Sync + 'static,
) -> Self
pub fn new( provider: &'static str, drive: impl Fn(WireChunks) -> BoxFuture<'static, Result<DrainedStream, CompletionError>> + Send + Sync + 'static, ) -> Self
Wrap a provider pipeline closure.
Sourcepub async fn drive(
&self,
chunks: WireChunks,
) -> Result<DrainedStream, CompletionError>
pub async fn drive( &self, chunks: WireChunks, ) -> Result<DrainedStream, CompletionError>
Run the provider’s full pipeline over chunks and drain it.
Auto Trait Implementations§
impl !RefUnwindSafe for WireDriver
impl !UnwindSafe for WireDriver
impl Freeze for WireDriver
impl Send for WireDriver
impl Sync for WireDriver
impl Unpin for WireDriver
impl UnsafeUnpin for WireDriver
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
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> ⓘ
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> ⓘ
Converts
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> ⓘ
Converts
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