pub struct MemorySink { /* private fields */ }Expand description
Implementations§
Source§impl MemorySink
impl MemorySink
Sourcepub fn recorded(&self) -> Vec<WriteBatch>
pub fn recorded(&self) -> Vec<WriteBatch>
The batches recorded so far, in arrival order.
Recovers a poisoned lock: the recording is inert data with no invariant a panicking writer could tear, and a test asserting on it must not itself panic on poisoning.
Sourcepub fn recorded_searches(&self) -> Vec<SearchOp>
pub fn recorded_searches(&self) -> Vec<SearchOp>
The search operations received so far, in arrival order. Recovers a
poisoned lock for the same reason as MemorySink::recorded.
Trait Implementations§
Source§impl Debug for MemorySink
impl Debug for MemorySink
Source§impl Default for MemorySink
impl Default for MemorySink
Source§fn default() -> MemorySink
fn default() -> MemorySink
Returns the “default value” for a type. Read more
Source§impl Reader for MemorySink
impl Reader for MemorySink
Source§async fn get(&self, op: ReadOp) -> Result<ReadOutcome, SinkError>
async fn get(&self, op: ReadOp) -> Result<ReadOutcome, SinkError>
Fetches a single document by physical id. Read more
Source§async fn search(&self, op: SearchOp) -> Result<SearchOutcome, SinkError>
async fn search(&self, op: SearchOp) -> Result<SearchOutcome, SinkError>
Runs a search, returning the raw hits envelope. Read more
Source§async fn search_stream(
&self,
op: SearchOp,
) -> Result<StreamingSearch, SinkError>
async fn search_stream( &self, op: SearchOp, ) -> Result<StreamingSearch, SinkError>
Runs a search whose response streams back (ADR-014, final stage): the
upstream hits envelope is piped to the engine’s hit transform without being
collected, so a large response (e.g. heavy
aggregations) never lands in
memory. The default is unsupported; OpenSearchSink overrides it with a
real streamed upstream call. Read moreSource§async fn count(&self, op: SearchOp) -> Result<CountOutcome, SinkError>
async fn count(&self, op: SearchOp) -> Result<CountOutcome, SinkError>
Counts the documents matching a (partition-filtered) query. Read more
Source§fn cursor(
&self,
_op: CursorOp,
) -> impl Future<Output = Result<CursorOutcome, SinkError>> + Send
fn cursor( &self, _op: CursorOp, ) -> impl Future<Output = Result<CursorOutcome, SinkError>> + Send
Forwards a raw cursor request to its pinned cluster (scroll/PIT continue,
clear, close). The default is unsupported, a sink that cannot
passthrough (the in-memory test sink, a write-only queue) rejects it;
OpenSearchSink overrides it with a real upstream call. Read moreSource§fn forward_stream(
&self,
_op: ForwardOp,
_body: ByteBody,
) -> impl Future<Output = Result<StreamingForward, SinkError>> + Send
fn forward_stream( &self, _op: ForwardOp, _body: ByteBody, ) -> impl Future<Output = Result<StreamingForward, SinkError>> + Send
Forwards a request to a cluster with the body supplied as a stream
(ADR-014 stage 2): the verbatim-passthrough path pipes the downstream body
straight upstream without buffering. The default is unsupported;
OpenSearchSink overrides it with a real streamed upstream call. Read moreAuto Trait Implementations§
impl !Freeze for MemorySink
impl RefUnwindSafe for MemorySink
impl Send for MemorySink
impl Sync for MemorySink
impl Unpin for MemorySink
impl UnsafeUnpin for MemorySink
impl UnwindSafe for MemorySink
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