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(Vec<Result<WireInput, Error>>) -> Pin<Box<dyn Future<Output = Result<DrainedStream, CompletionError>> + Send>> + Send + Sync + 'static,
) -> WireDriver
Available on crate features test-utils only.
pub fn new( provider: &'static str, drive: impl Fn(Vec<Result<WireInput, Error>>) -> Pin<Box<dyn Future<Output = Result<DrainedStream, CompletionError>> + Send>> + Send + Sync + 'static, ) -> WireDriver
test-utils only.Wrap a provider pipeline closure.
Sourcepub async fn drive(
&self,
chunks: Vec<Result<WireInput, Error>>,
) -> Result<DrainedStream, CompletionError>
Available on crate features test-utils only.
pub async fn drive( &self, chunks: Vec<Result<WireInput, Error>>, ) -> Result<DrainedStream, CompletionError>
test-utils only.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