Skip to main content

EventBatchFeed

Struct EventBatchFeed 

Source
pub struct EventBatchFeed<F, I = MarketEvent> { /* private fields */ }
Expand description

Groups a fallible event cursor into complete timestamp batches.

Implementations§

Source§

impl<F, I> EventBatchFeed<F, I>

Source

pub fn new<E>(next_event: F, roles: SeriesRoles, series_rank: u32) -> Self
where F: FnMut() -> Result<Option<I>, E>, I: EventSourceItem,

Source§

impl<F, I, E> EventBatchFeed<F, I>
where F: FnMut() -> Result<Option<I>, E>, I: EventSourceItem,

Source

pub fn next_timestamp_batch( &mut self, ) -> Result<Option<TimestampBatch>, EventBatchFeedError<E>>

Return the next complete timestamp batch.

Trait Implementations§

Source§

impl<F, I, E> FallibleBatchFeed for EventBatchFeed<F, I>
where F: FnMut() -> Result<Option<I>, E>, I: EventSourceItem,

Source§

type Error = EventBatchFeedError<E>

Source§

fn next_batch(&mut self) -> Result<Option<TimestampBatch>, Self::Error>

Return every event at the next timestamp, or None at end of input.

Auto Trait Implementations§

§

impl<F, I> Freeze for EventBatchFeed<F, I>
where F: Freeze, PhantomData<fn() -> I>: Freeze,

§

impl<F, I> RefUnwindSafe for EventBatchFeed<F, I>

§

impl<F, I> Send for EventBatchFeed<F, I>
where F: Send, PhantomData<fn() -> I>: Send,

§

impl<F, I> Sync for EventBatchFeed<F, I>
where F: Sync, PhantomData<fn() -> I>: Sync,

§

impl<F, I> Unpin for EventBatchFeed<F, I>
where F: Unpin, PhantomData<fn() -> I>: Unpin,

§

impl<F, I> UnsafeUnpin for EventBatchFeed<F, I>

§

impl<F, I> UnwindSafe for EventBatchFeed<F, I>
where F: UnwindSafe, PhantomData<fn() -> I>: UnwindSafe,

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V