pub struct TimeSplitter<E, F> { /* private fields */ }Expand description
Splits a stream by time.
Implementations§
Source§impl<E, F> TimeSplitter<E, F>
impl<E, F> TimeSplitter<E, F>
Sourcepub fn new(build_encoder: F, split_duration: SplitDuration) -> Self
pub fn new(build_encoder: F, split_duration: SplitDuration) -> Self
Creates a new splitter that will split the input stream according to
split_duration, creating a separate sub-encoder for each split using
build_encoder.
Trait Implementations§
Source§impl<E, F> Splitter<E> for TimeSplitter<E, F>
impl<E, F> Splitter<E> for TimeSplitter<E, F>
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> Freeze for TimeSplitter<E, F>where
F: Freeze,
impl<E, F> RefUnwindSafe for TimeSplitter<E, F>where
F: RefUnwindSafe,
E: RefUnwindSafe,
impl<E, F> Send for TimeSplitter<E, F>
impl<E, F> Sync for TimeSplitter<E, F>
impl<E, F> Unpin for TimeSplitter<E, F>
impl<E, F> UnsafeUnpin for TimeSplitter<E, F>where
F: UnsafeUnpin,
impl<E, F> UnwindSafe for TimeSplitter<E, F>where
F: UnwindSafe,
E: UnwindSafe,
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