pub struct DecodeReader<R, C, P> { /* private fields */ }Expand description
Wraps a Reader<Payload> and decodes each message using an EventCodec<P>,
yielding typed Reader<P>.
Implementations§
Source§impl<R, C, P> DecodeReader<R, C, P>
impl<R, C, P> DecodeReader<R, C, P>
pub fn new(inner: R, codec: C) -> Self
pub fn with_disposition(self, disposition: DecodeErrorDisposition) -> Self
Source§impl<R, C, P> DecodeReader<R, PayloadEventCodec<C>, P>where
C: PayloadCodec<P>,
impl<R, C, P> DecodeReader<R, PayloadEventCodec<C>, P>where
C: PayloadCodec<P>,
pub fn from_payload_codec(inner: R, codec: C) -> Self
Trait Implementations§
Source§impl<R, C, P> Reader<P> for DecodeReader<R, C, P>
impl<R, C, P> Reader<P> for DecodeReader<R, C, P>
type Subscription = <R as Reader>::Subscription
type Acker = <R as Reader>::Acker
type Cursor = <R as Reader>::Cursor
type Stream = Pin<Box<dyn Stream<Item = Result<Message<<R as Reader>::Acker, <R as Reader>::Cursor, P>, Error>> + Send>>
async fn read(&self, subscription: Self::Subscription) -> Result<Self::Stream>
Auto Trait Implementations§
impl<R, C, P> Freeze for DecodeReader<R, C, P>
impl<R, C, P> RefUnwindSafe for DecodeReader<R, C, P>
impl<R, C, P> Send for DecodeReader<R, C, P>
impl<R, C, P> Sync for DecodeReader<R, C, P>
impl<R, C, P> Unpin for DecodeReader<R, C, P>
impl<R, C, P> UnsafeUnpin for DecodeReader<R, C, P>where
R: UnsafeUnpin,
C: UnsafeUnpin,
impl<R, C, P> UnwindSafe for DecodeReader<R, C, P>
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> 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