pub struct StreamAdapter { /* private fields */ }Expand description
A streaming data adapter backed by a tokio unbounded MPSC channel.
Unlike JsonAdapter and CsvAdapter,
StreamAdapter does not implement the synchronous DataAdapter
trait. Instead it exposes async and try-recv methods for consuming candles
one at a time from a live data feed.
Implementations§
Source§impl StreamAdapter
impl StreamAdapter
Sourcepub fn new() -> (Self, UnboundedSender<Candle>)
pub fn new() -> (Self, UnboundedSender<Candle>)
Creates a new StreamAdapter together with the sender half that can
be used to push candles into the stream.
Auto Trait Implementations§
impl Freeze for StreamAdapter
impl RefUnwindSafe for StreamAdapter
impl Send for StreamAdapter
impl Sync for StreamAdapter
impl Unpin for StreamAdapter
impl UnsafeUnpin for StreamAdapter
impl UnwindSafe for StreamAdapter
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