pub struct DefaultEpisodeRepository { /* private fields */ }Expand description
RecordStore + EpisodeStore を組み合わせた Repository 実装
Implementations§
Source§impl DefaultEpisodeRepository
impl DefaultEpisodeRepository
pub fn new( record_store: Arc<dyn RecordStore>, episode_store: Arc<dyn EpisodeStore>, ) -> Self
Trait Implementations§
Source§impl EpisodeRepository for DefaultEpisodeRepository
impl EpisodeRepository for DefaultEpisodeRepository
Source§fn save(&self, episode: &Episode) -> Result<EpisodeId, StoreError>
fn save(&self, episode: &Episode) -> Result<EpisodeId, StoreError>
Episode を保存(Record も含めて永続化)
Source§fn find_by_id(&self, id: &EpisodeId) -> Result<Option<Episode>, StoreError>
fn find_by_id(&self, id: &EpisodeId) -> Result<Option<Episode>, StoreError>
ID で Episode を取得(Record を含む完全な Entity)
Source§fn find_all(&self, filter: &EpisodeFilter) -> Result<Vec<Episode>, StoreError>
fn find_all(&self, filter: &EpisodeFilter) -> Result<Vec<Episode>, StoreError>
フィルタで検索(Record を含む完全な Entity)
Source§fn count(&self, filter: Option<&EpisodeFilter>) -> Result<usize, StoreError>
fn count(&self, filter: Option<&EpisodeFilter>) -> Result<usize, StoreError>
件数を取得
Source§fn list_meta(
&self,
filter: Option<&EpisodeFilter>,
) -> Result<Vec<EpisodeMeta>, StoreError>
fn list_meta( &self, filter: Option<&EpisodeFilter>, ) -> Result<Vec<EpisodeMeta>, StoreError>
メタ情報のみをリスト(軽量)
Auto Trait Implementations§
impl Freeze for DefaultEpisodeRepository
impl !RefUnwindSafe for DefaultEpisodeRepository
impl Send for DefaultEpisodeRepository
impl Sync for DefaultEpisodeRepository
impl Unpin for DefaultEpisodeRepository
impl !UnwindSafe for DefaultEpisodeRepository
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