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>
impl<'fixture> StreamPatternSource<'fixture>
Sourcepub const fn new(
pattern: StreamPattern<'fixture>,
) -> Result<Self, StreamFixtureError>
pub const fn new( pattern: StreamPattern<'fixture>, ) -> Result<Self, StreamFixtureError>
Creates a deterministic non-terminating source pattern.
Sourcepub const fn observations(&self) -> usize
pub const fn observations(&self) -> usize
Returns the number of source observations.
Trait Implementations§
Source§impl AsyncStreamSource for StreamPatternSource<'_>
impl AsyncStreamSource for StreamPatternSource<'_>
Source§type Error = StreamFixtureError
type Error = StreamFixtureError
Source-specific payload-free failure.
Source§fn replayability(&self) -> StreamReplayability<'_>
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>
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<'_>
impl BlockingStreamSource for StreamPatternSource<'_>
Source§type Error = StreamFixtureError
type Error = StreamFixtureError
Source-specific payload-free failure.
Source§fn replayability(&self) -> StreamReplayability<'_>
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>
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> 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> LocalAsyncStreamSource for Twhere
T: AsyncStreamSource,
impl<T> LocalAsyncStreamSource for Twhere
T: AsyncStreamSource,
Source§type Error = <T as AsyncStreamSource>::Error
type Error = <T as AsyncStreamSource>::Error
Source-specific payload-free failure.
Source§fn replayability(&self) -> StreamReplayability<'_>
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>
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.