pub struct BoxedStream(/* private fields */);Expand description
A component-state stream of any concrete type, behind one dynamic dispatch.
Constructing one is the explicit, greppable point where a registered stream stops being monomorphized. Erasure does not change the stream’s namespace, definition identity, checkpoint selection, or restart semantics: representation is never restart-relevant (ADR-0008).
Implementations§
Source§impl BoxedStream
impl BoxedStream
Sourcepub fn new<S: ItemStream + 'static>(stream: S) -> Self
pub fn new<S: ItemStream + 'static>(stream: S) -> Self
Erases a concrete stream.
Trait Implementations§
Source§impl ItemStream for BoxedStream
impl ItemStream for BoxedStream
Source§fn open<'a>(
&'a self,
context: StreamOpenContext<'a>,
) -> impl Future<Output = Result<StreamOpenOutcome, StreamOpenError>> + Send + 'a
fn open<'a>( &'a self, context: StreamOpenContext<'a>, ) -> impl Future<Output = Result<StreamOpenOutcome, StreamOpenError>> + Send + 'a
Restores last committed state, or begins initial execution. Read more
Source§fn update<'a>(
&'a self,
context: StreamUpdateContext<'a>,
) -> impl Future<Output = Result<ComponentStateEnvelope, StreamUpdateError>> + Send + 'a
fn update<'a>( &'a self, context: StreamUpdateContext<'a>, ) -> impl Future<Output = Result<ComponentStateEnvelope, StreamUpdateError>> + Send + 'a
Produces the candidate component-state envelope for the chunk about
to commit. Read more
Source§fn close<'a>(
&'a self,
context: StreamCloseContext<'a>,
) -> impl Future<Output = Result<StreamCloseOutcome, StreamCloseError>> + Send + 'a
fn close<'a>( &'a self, context: StreamCloseContext<'a>, ) -> impl Future<Output = Result<StreamCloseOutcome, StreamCloseError>> + Send + 'a
Runs once for every stream that opened successfully in this step
attempt. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for BoxedStream
impl !UnwindSafe for BoxedStream
impl Freeze for BoxedStream
impl Send for BoxedStream
impl Sync for BoxedStream
impl Unpin for BoxedStream
impl UnsafeUnpin for BoxedStream
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