Rindle docs and package mapSkip to main content

Drain

Struct Drain 

Source
pub struct Drain { /* private fields */ }
Expand description

The running drain: owns the two worker/forwarder/loop threads. Dropping (or shutdown) stops the loop; the forwarder exits when the cluster’s channel-out closes (i.e. when the Cluster is dropped).

Implementations§

Source§

impl Drain

Source

pub fn spawn<S: DrainSink + 'static>( events: Receiver<ClusterEvent>, initial_cv: u64, sink: S, ) -> Drain

Spawn the drain over a cluster’s channel-out events, with initial_cv the replica’s committed watermark at open (the progress frontier) and sink the delivery target. Returns the handle plus a DrainHandle for the coordinator.

Source

pub fn handle(&self) -> DrainHandle

A coordinator-side control handle (cheap clone).

Source

pub fn shutdown(self)

Stop the loop and join it. The forwarder is left to exit on cluster close.

Trait Implementations§

Source§

impl Drop for Drain

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl Freeze for Drain

§

impl !RefUnwindSafe for Drain

§

impl Send for Drain

§

impl Sync for Drain

§

impl Unpin for Drain

§

impl UnsafeUnpin for Drain

§

impl !UnwindSafe for Drain

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

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,