pub struct DataSink { /* private fields */ }Expand description
Record/Episode の永続化を担当
Implementations§
Source§impl DataSink
impl DataSink
Sourcepub fn new(
record_store: Arc<dyn RecordStore>,
episode_store: Arc<dyn EpisodeStore>,
learn_model: Arc<dyn LearnModel>,
) -> Self
pub fn new( record_store: Arc<dyn RecordStore>, episode_store: Arc<dyn EpisodeStore>, learn_model: Arc<dyn LearnModel>, ) -> Self
新しい DataSink を作成
Sourcepub fn record_store(&self) -> &Arc<dyn RecordStore>
pub fn record_store(&self) -> &Arc<dyn RecordStore>
Record Store への参照を取得
Sourcepub fn episode_store(&self) -> &Arc<dyn EpisodeStore>
pub fn episode_store(&self) -> &Arc<dyn EpisodeStore>
Episode Store への参照を取得
Sourcepub fn record_count(&self) -> usize
pub fn record_count(&self) -> usize
永続化した Record 数を取得
Sourcepub fn episode_count(&self) -> usize
pub fn episode_count(&self) -> usize
生成した Episode 数を取得
Sourcepub fn stats(&self) -> DataSinkStats
pub fn stats(&self) -> DataSinkStats
統計情報を取得
Auto Trait Implementations§
impl Freeze for DataSink
impl !RefUnwindSafe for DataSink
impl Send for DataSink
impl Sync for DataSink
impl Unpin for DataSink
impl !UnwindSafe for DataSink
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