pub struct ModelEventStream { /* private fields */ }Expand description
Receiver for incremental model JSON events.
Implementations§
Source§impl ModelEventStream
impl ModelEventStream
Sourcepub fn new(receiver: Receiver<Result<Value, ModelError>>) -> Self
pub fn new(receiver: Receiver<Result<Value, ModelError>>) -> Self
Build a stream from a channel receiver.
Sourcepub const fn new_with_cancellation(
receiver: Receiver<Result<Value, ModelError>>,
cancellation_token: CancellationToken,
) -> Self
pub const fn new_with_cancellation( receiver: Receiver<Result<Value, ModelError>>, cancellation_token: CancellationToken, ) -> Self
Build a stream from a channel receiver and cancellation token.
Sourcepub const fn new_with_cancellation_and_drop_abort(
receiver: Receiver<Result<Value, ModelError>>,
cancellation_token: CancellationToken,
drop_abort_token: Option<CancellationToken>,
) -> Self
pub const fn new_with_cancellation_and_drop_abort( receiver: Receiver<Result<Value, ModelError>>, cancellation_token: CancellationToken, drop_abort_token: Option<CancellationToken>, ) -> Self
Build a stream from a channel receiver, cancellation token, and drop-abort token.
Sourcepub fn drop_abort_token(&self) -> Option<CancellationToken>
pub fn drop_abort_token(&self) -> Option<CancellationToken>
Return the transport-local drop-abort token, when the stream owns one.
Trait Implementations§
Source§impl Drop for ModelEventStream
impl Drop for ModelEventStream
Auto Trait Implementations§
impl Freeze for ModelEventStream
impl RefUnwindSafe for ModelEventStream
impl Send for ModelEventStream
impl Sync for ModelEventStream
impl Unpin for ModelEventStream
impl UnsafeUnpin for ModelEventStream
impl UnwindSafe for ModelEventStream
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