pub struct Intake<'a> { /* private fields */ }Expand description
One Bootstrap.Restore stream’s intake on the server — see the module docs.
Implementations§
Source§impl<'a> Intake<'a>
impl<'a> Intake<'a>
Sourcepub fn open(stores: &'a ServerStores, owner: &str) -> Result<Option<Intake<'a>>>
pub fn open(stores: &'a ServerStores, owner: &str) -> Result<Option<Intake<'a>>>
Open the box’s intake for one stream: super::restore_begin_by (the owner check, the
next sequence), then what is staged made trustworthy ([sanitize]). Ok(None): another
stream’s intake still holds this box.
Sourcepub fn take(&mut self, chunk: &LogChunk) -> ControlResult<()>
pub fn take(&mut self, chunk: &LogChunk) -> ControlResult<()>
One chunk of the stream.
Sourcepub fn end_of_stream(&mut self) -> ControlResult<()>
pub fn end_of_stream(&mut self) -> ControlResult<()>
The stream ended. Err when inside an entry: what this box holds of it, durably, and
where the next stream resumes — or, for a sender that cannot resume, why it never will.
Trait Implementations§
Source§impl Drop for Intake<'_>
impl Drop for Intake<'_>
Source§fn drop(&mut self)
fn drop(&mut self)
A stream that never reached Intake::end_of_stream — the handler returned early on a
broken stream or a refusal, or its future was dropped — still keeps every byte it wrote.
Source§impl RestoreIntake for Intake<'_>
impl RestoreIntake for Intake<'_>
Source§fn take(&mut self, chunk: &LogChunk) -> ControlResult<()>
fn take(&mut self, chunk: &LogChunk) -> ControlResult<()>
One chunk: a piece of an entry (
seq > 0) or of a snapshot (seq 0). An entry is
applied when its last piece arrives whole.Source§fn end_of_stream(&mut self) -> ControlResult<()>
fn end_of_stream(&mut self) -> ControlResult<()>
The stream ended cleanly.
Err when it ended inside an entry — naming what this box
holds of it and where the next stream resumes.Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Intake<'a>
impl<'a> !Sync for Intake<'a>
impl<'a> !UnwindSafe for Intake<'a>
impl<'a> Freeze for Intake<'a>
impl<'a> Send for Intake<'a>
impl<'a> Unpin for Intake<'a>
impl<'a> UnsafeUnpin for Intake<'a>
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request