pub struct StreamBridge { /* private fields */ }Expand description
Push-to-pull bridge carrying RecordBatch results from the reactor
into a DataFusion query execution plan.
Implementations§
Source§impl StreamBridge
impl StreamBridge
Sourcepub fn new(schema: SchemaRef, capacity: usize) -> Self
pub fn new(schema: SchemaRef, capacity: usize) -> Self
Creates a new bridge with the given schema and channel capacity.
Sourcepub fn with_default_capacity(schema: SchemaRef) -> Self
pub fn with_default_capacity(schema: SchemaRef) -> Self
Creates a new bridge with default capacity.
Sourcepub fn sender(&self) -> BridgeSender
pub fn sender(&self) -> BridgeSender
Returns a cloneable sender for pushing batches into the bridge.
Multiple senders can be created by cloning the returned sender.
Sourcepub fn into_stream(self) -> BridgeStream
pub fn into_stream(self) -> BridgeStream
Converts this bridge into a RecordBatchStream for DataFusion.
This consumes the bridge, taking ownership of the receiver.
After calling this, you can still use senders obtained from sender().
§Panics
Panics if called more than once (the receiver can only be taken once).
Sourcepub fn take_stream(&mut self) -> Option<BridgeStream>
pub fn take_stream(&mut self) -> Option<BridgeStream>
Creates a stream without consuming the bridge.
This takes ownership of the receiver, so subsequent calls will return None.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StreamBridge
impl !RefUnwindSafe for StreamBridge
impl Send for StreamBridge
impl !Sync for StreamBridge
impl Unpin for StreamBridge
impl UnsafeUnpin for StreamBridge
impl !UnwindSafe for StreamBridge
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
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more