pub struct SymbolSplitter<E, F, M> { /* private fields */ }Expand description
Splits a stream by symbol.
It’s generic over SymbolIndex, allowing it to work with both
TsSymbolMap and PitSymbolMap.
Implementations§
Source§impl<E, F, M> SymbolSplitter<E, F, M>
impl<E, F, M> SymbolSplitter<E, F, M>
Sourcepub fn new(build_encoder: F, symbol_map: M) -> Self
pub fn new(build_encoder: F, symbol_map: M) -> Self
Creates a new splitter that will split the input stream by symbol,
creating a separate sub-encoder for each symbol using build_encoder.
The symbol_map is used to look up the symbol for each record based on
the instrument ID (and optionally the timestamp for TsSymbolMap).
Trait Implementations§
Source§impl<E, F, M> Splitter<E> for SymbolSplitter<E, F, M>
impl<E, F, M> Splitter<E> for SymbolSplitter<E, F, M>
Source§fn sub_encoder<R>(
&mut self,
metadata: Option<&Metadata>,
record: &R,
) -> Result<Option<&mut E>>where
R: Record,
fn sub_encoder<R>(
&mut self,
metadata: Option<&Metadata>,
record: &R,
) -> Result<Option<&mut E>>where
R: Record,
Returns the encoder for the given record, or
None if the record should be ignored. Read moreSource§fn sub_encoders<'a>(&'a mut self) -> impl Iterator<Item = &'a mut E>where
E: 'a,
fn sub_encoders<'a>(&'a mut self) -> impl Iterator<Item = &'a mut E>where
E: 'a,
Returns an iterator over all active sub-encoders.
Auto Trait Implementations§
impl<E, F, M> Freeze for SymbolSplitter<E, F, M>
impl<E, F, M> RefUnwindSafe for SymbolSplitter<E, F, M>
impl<E, F, M> Send for SymbolSplitter<E, F, M>
impl<E, F, M> Sync for SymbolSplitter<E, F, M>
impl<E, F, M> Unpin for SymbolSplitter<E, F, M>
impl<E, F, M> UnsafeUnpin for SymbolSplitter<E, F, M>where
F: UnsafeUnpin,
M: UnsafeUnpin,
impl<E, F, M> UnwindSafe for SymbolSplitter<E, F, M>
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