Skip to main content

Stream

Struct Stream 

Source
pub struct Stream<'d, B: Build<'d>, O: Origin = Stored> { /* private fields */ }
Expand description

Incremental builder and the exact accounting state of its input.

Implementations§

Source§

impl<'d, B: Build<'d>> Stream<'d, B>

Source

pub fn new(open: Track<Open>, build: B) -> Self

Source

pub fn finished(done: Track<Finished>, build: B) -> Self

Source§

impl<'d, B: Build<'d>, O: Origin> Stream<'d, B, O>

Source

pub fn start(open: Track<Open>, build: B, ledger: &Ledger<'_, O>) -> Self

Source

pub fn ended(done: Track<Finished>, build: B, ledger: &Ledger<'_, O>) -> Self

Source

pub const fn max_body(&self) -> usize

Source

pub const fn retention(&self) -> Retention

Source

pub fn discard<E: Evidence>( self, ledger: &mut Ledger<'_, O>, event: &mut E, ) -> Discard<O>

Source

pub fn abandon<E: Evidence>(self, event: E)

Source

pub fn into_release(self) -> Release<O>

Source

pub fn try_discard<E>( self, ledger: &mut Ledger<'_, O>, event: E, _: Segments<'d>, bytes: usize, boundary: Boundary, ) -> Transfer<Self, Error>
where E: Evidence,

Source

pub fn try_push<D, I, E, F>( self, ledger: &mut Ledger<'_, O>, event: E, input: Input<D>, boundary: Boundary, (rmax, cmax): (Limits, Limits), parts: F, ) -> Push<D, Self, <B as Push<'d>>::Error>
where B: Push<'d>, I: Parts<'d>, E: Evidence, F: FnOnce(D) -> I,

Source

pub fn try_finish<E: Evidence>( self, ledger: &mut Ledger<'_, O>, event: E, ) -> Transfer<Self, Error>

Source

pub fn try_exact<E: Evidence>( self, ledger: &mut Ledger<'_, O>, event: E, len: usize, ) -> Transfer<Self, Error>

Finishes with the carrier’s final logical total, including prior input.

Source

pub fn try_drive<E: Evidence>( self, ledger: &mut Ledger<'_, O>, event: E, budget: NonZero<usize>, ) -> (Drive<'d, B, O>, E)

Source

pub fn try_step<E: Evidence>( self, ledger: &mut Ledger<'_, O>, event: &mut E, budget: NonZero<usize>, ) -> Drive<'d, B, O>

Trait Implementations§

Source§

impl<'d, B: Build<'d>, O: Origin> Bind for Stream<'d, B, O>

Source§

type Origin = O

Source§

type Bound<Q: Origin> = Stream<'d, B, Q>

Source§

unsafe fn bind<Q: Origin>(self, origin: Q) -> Self::Bound<Q>

Safety Read more

Auto Trait Implementations§

§

impl<'d, B, O> Forget for Stream<'d, B, O>

§

impl<'d, B, O> Freeze for Stream<'d, B, O>
where State<O>: Freeze, Flow<'d, B>: Freeze,

§

impl<'d, B, O> RefUnwindSafe for Stream<'d, B, O>

§

impl<'d, B, O> Send for Stream<'d, B, O>
where State<O>: Send, Flow<'d, B>: Send,

§

impl<'d, B, O> Sync for Stream<'d, B, O>
where State<O>: Sync, Flow<'d, B>: Sync,

§

impl<'d, B, O> Unpin for Stream<'d, B, O>
where State<O>: Unpin, Flow<'d, B>: Unpin,

§

impl<'d, B, O> UnsafeUnpin for Stream<'d, B, O>
where State<O>: UnsafeUnpin, Flow<'d, B>: UnsafeUnpin,

§

impl<'d, B, O> UnwindSafe for Stream<'d, B, O>
where State<O>: UnwindSafe, Flow<'d, B>: UnwindSafe,

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> Convert<T> for T

Source§

fn into(self) -> T

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.