Skip to main content

StreamPatternSource

Struct StreamPatternSource 

Source
pub struct StreamPatternSource<'fixture> { /* private fields */ }
Expand description

Non-terminating stream source used to verify cancellation and hard bounds.

Implementations§

Source§

impl<'fixture> StreamPatternSource<'fixture>

Source

pub const fn new( pattern: StreamPattern<'fixture>, ) -> Result<Self, StreamFixtureError>

Creates a deterministic non-terminating source pattern.

Source

pub const fn observations(&self) -> usize

Returns the number of source observations.

Trait Implementations§

Source§

impl AsyncStreamSource for StreamPatternSource<'_>

Source§

type Error = StreamFixtureError

Source-specific payload-free failure.
Source§

fn replayability(&self) -> StreamReplayability<'_>

Returns explicit body replayability and exact source version.
Source§

async fn read_chunk<'operation>( &'operation mut self, output: &'operation mut [u8], ) -> Result<StreamRead, Self::Error>

Produces at most one chunk in a Send future.
Source§

impl BlockingStreamSource for StreamPatternSource<'_>

Source§

type Error = StreamFixtureError

Source-specific payload-free failure.
Source§

fn replayability(&self) -> StreamReplayability<'_>

Returns explicit body replayability and exact source version.
Source§

fn read_chunk(&mut self, output: &mut [u8]) -> Result<StreamRead, Self::Error>

Produces at most one chunk and never retains output.

Auto Trait Implementations§

§

impl<'fixture> Freeze for StreamPatternSource<'fixture>

§

impl<'fixture> RefUnwindSafe for StreamPatternSource<'fixture>

§

impl<'fixture> Send for StreamPatternSource<'fixture>

§

impl<'fixture> Sync for StreamPatternSource<'fixture>

§

impl<'fixture> Unpin for StreamPatternSource<'fixture>

§

impl<'fixture> UnsafeUnpin for StreamPatternSource<'fixture>

§

impl<'fixture> UnwindSafe for StreamPatternSource<'fixture>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> LocalAsyncStreamSource for T

Source§

type Error = <T as AsyncStreamSource>::Error

Source-specific payload-free failure.
Source§

fn replayability(&self) -> StreamReplayability<'_>

Returns explicit body replayability and exact source version.
Source§

async fn read_chunk_local<'operation>( &'operation mut self, output: &'operation mut [u8], ) -> Result<StreamRead, <T as LocalAsyncStreamSource>::Error>

Produces at most one chunk without retaining output after completion.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.