Pool

Struct Pool 

Source
pub struct Pool(/* private fields */);

Implementations§

Source§

impl Pool

Source

pub async fn insert_tasks<I>( &self, tasks: I, params: &TaskParams, ) -> Result<u64>
where I: Iterator<Item = TaskPayload>,

Trait Implementations§

Source§

impl AsRef<Pool<Sqlite>> for Pool

Source§

fn as_ref(&self) -> &SqlitePool

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AuthenticationRepository for Pool

Source§

async fn find_by_credentials( &self, email: &str, password: &str, ) -> Result<Option<Profile>>

Source§

async fn create( &self, email: &str, password: &str, ) -> Result<Profile, SignupError>

Source§

impl Clone for Pool

Source§

fn clone(&self) -> Pool

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Pool

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl MediaRepository for Pool

Source§

async fn find_by_id(&self, media_id: u64) -> Result<Option<MediaFile>>

Source§

async fn upsert(&self, disk: &str, input: &[MediaFileInput]) -> Result<u64>

Source§

impl PodcastEpisodeRepository for Pool

Source§

async fn find_by_id(&self, episode_id: u64) -> Result<Option<PodcastEpisode>>

Source§

async fn list<'a>( &self, params: ListPodcastEpisodeParams<'a>, ) -> Result<Vec<PodcastEpisode>>

Source§

async fn delete_progressions( &self, user_id: u64, episode_ids: &[u64], ) -> Result<()>

Source§

async fn list_progressions( &self, user_id: u64, episode_ids: &[u64], ) -> Result<Vec<PodcastEpisodeProgress>>

Source§

async fn upsert_progressions( &self, inputs: &[PodcastEpisodeProgressInput], ) -> Result<Vec<PodcastEpisodeProgress>>

Source§

impl PodcastRepository for Pool

Source§

async fn find_by_id(&self, podcast_id: u64) -> Result<Option<Podcast>>

Source§

async fn find_by_feed_url(&self, feed_url: &str) -> Result<Option<Podcast>>

Source§

async fn list<'a>(&self, params: ListPodcastParams<'a>) -> Result<Vec<Podcast>>

Source§

async fn upsert(&self, entity: &PodcastInput) -> Result<Podcast>

Source§

impl PodcastSubscriptionRepository for Pool

Source§

async fn create(&self, user_id: u64, podcast_id: u64) -> Result<()>

Source§

async fn delete(&self, user_id: u64, podcast_id: u64) -> Result<()>

Source§

async fn list( &self, user_id: u64, podcast_ids: &[u64], ) -> Result<Vec<PodcastSubscription>>

Source§

async fn update( &self, user_id: u64, podcast_id: u64, body: PodcastSubscriptionUpdate, ) -> Result<()>

Source§

async fn find( &self, user_id: u64, podcast_id: u64, ) -> Result<Option<PodcastSubscription>>

Source§

impl PodcastTaskRepository for Pool

Source§

async fn last( &self, method: TaskMethod, podcast_ids: &[u64], ) -> Result<Vec<Task>>

Source§

impl TaskRepository for Pool

Source§

async fn start_task(&self) -> Result<Option<Task>>

Source§

async fn complete_task(&self, task_id: u64) -> Result<()>

Source§

async fn fail_task(&self, task_id: u64, error: String) -> Result<()>

Source§

async fn find_by_target_ids( &self, task_method: TaskMethod, target_ids: &[u64], ) -> Result<Vec<Task>>

Source§

impl TvShowEpisodeFileRepository for Pool

Source§

async fn list<'a>( &self, params: ListEpisodeFileParams<'a>, ) -> Result<Vec<TvShowEpisodeFile>>

Source§

impl TvShowEpisodeRepository for Pool

Source§

async fn find_by_id( &self, episode_id: u64, language: Language, ) -> Result<Option<TvShowEpisode>>

Source§

async fn list<'a>( &self, params: ListTvShowEpisodeParams<'a>, ) -> Result<Vec<TvShowEpisode>>

Source§

async fn upsert( &self, tvshow_id: u64, input: &[ExternalTvShowEpisode], ) -> Result<Vec<TvShowEpisode>>

Source§

async fn delete_progressions( &self, user_id: u64, episode_ids: &[u64], ) -> Result<()>

Source§

async fn list_progressions( &self, user_id: u64, episode_ids: &[u64], ) -> Result<Vec<TvShowEpisodeProgress>>

Source§

async fn upsert_progressions( &self, inputs: &[TvShowEpisodeProgressInput], ) -> Result<Vec<TvShowEpisodeProgress>>

Source§

impl TvShowRepository for Pool

Source§

async fn find_by_id( &self, tvshow_id: u64, language: Language, ) -> Result<Option<TvShow>>

Source§

async fn find_by_source( &self, source: TvShowSource, language: Language, ) -> Result<Option<TvShow>>

Source§

async fn list<'a>(&self, params: ListTvShowParams<'a>) -> Result<Vec<TvShow>>

Source§

async fn list_languages( &self, tvshow_ids: &[u64], ) -> Result<Vec<(u64, Language)>>

Source§

async fn upsert(&self, input: &ExternalTvShow) -> Result<TvShow>

Source§

impl TvShowSeasonRepository for Pool

Source§

async fn find_by_id( &self, season_id: u64, language: Language, ) -> Result<Option<TvShowSeason>>

Source§

async fn list<'a>( &self, params: ListTvShowSeasonParams<'a>, ) -> Result<Vec<TvShowSeason>>

Source§

async fn upsert( &self, tvshow_id: u64, input: &ExternalTvShowSeason, ) -> Result<TvShowSeason>

Source§

impl TvShowSubscriptionRepository for Pool

Source§

async fn list_by_ids( &self, user_id: u64, tvshow_ids: &[u64], ) -> Result<Vec<TvShowSubscription>>

Source§

async fn create(&self, user_id: u64, tvshow_id: u64) -> Result<()>

Source§

async fn delete(&self, user_id: u64, tvshow_id: u64) -> Result<()>

Source§

async fn list( &self, user_id: u64, language: Language, ) -> Result<Vec<TvShowWithSubscription>>

Auto Trait Implementations§

§

impl Freeze for Pool

§

impl !RefUnwindSafe for Pool

§

impl Send for Pool

§

impl Sync for Pool

§

impl Unpin for Pool

§

impl !UnwindSafe for Pool

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

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

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more