pub struct PgKeyPoolStorage<D>{ /* private fields */ }
Implementations§
Source§impl<D> PgKeyPoolStorage<D>where
D: PgKeyDomain,
impl<D> PgKeyPoolStorage<D>where
D: PgKeyDomain,
Trait Implementations§
Source§impl<D> Clone for PgKeyPoolStorage<D>
impl<D> Clone for PgKeyPoolStorage<D>
Source§fn clone(&self) -> PgKeyPoolStorage<D>
fn clone(&self) -> PgKeyPoolStorage<D>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<D> Debug for PgKeyPoolStorage<D>
impl<D> Debug for PgKeyPoolStorage<D>
Source§impl<'a, R: Row, D> FromRow<'a, R> for PgKeyPoolStorage<D>where
D: Serialize + DeserializeOwned + Send + Sync + 'static,
&'a str: ColumnIndex<R>,
PgPool: Decode<'a, R::Database> + Type<R::Database>,
i16: Decode<'a, R::Database> + Type<R::Database>,
Option<String>: Decode<'a, R::Database> + Type<R::Database>,
PhantomData<D>: Decode<'a, R::Database> + Type<R::Database>,
impl<'a, R: Row, D> FromRow<'a, R> for PgKeyPoolStorage<D>where
D: Serialize + DeserializeOwned + Send + Sync + 'static,
&'a str: ColumnIndex<R>,
PgPool: Decode<'a, R::Database> + Type<R::Database>,
i16: Decode<'a, R::Database> + Type<R::Database>,
Option<String>: Decode<'a, R::Database> + Type<R::Database>,
PhantomData<D>: Decode<'a, R::Database> + Type<R::Database>,
Source§impl<D> KeyPoolStorage for PgKeyPoolStorage<D>where
D: PgKeyDomain,
impl<D> KeyPoolStorage for PgKeyPoolStorage<D>where
D: PgKeyDomain,
type Key = PgKey<D>
type Domain = D
type Error = PgKeyPoolError<D>
async fn acquire_key<S>(&self, selector: S) -> Result<Self::Key, Self::Error>
async fn acquire_many_keys<S>( &self, selector: S, number: i64, ) -> Result<Vec<Self::Key>, Self::Error>
async fn timeout_key<S>( &self, selector: S, duration: Duration, ) -> Result<(), Self::Error>
async fn store_key( &self, user_id: i32, key: String, domains: Vec<D>, ) -> Result<Self::Key, Self::Error>
async fn read_key<S>( &self, selector: S, ) -> Result<Option<Self::Key>, Self::Error>
async fn read_keys<S>(&self, selector: S) -> Result<Vec<Self::Key>, Self::Error>
async fn remove_key<S>(&self, selector: S) -> Result<Self::Key, Self::Error>
async fn add_domain_to_key<S>( &self, selector: S, domain: D, ) -> Result<Self::Key, Self::Error>
async fn remove_domain_from_key<S>( &self, selector: S, domain: D, ) -> Result<Self::Key, Self::Error>
async fn set_domains_for_key<S>( &self, selector: S, domains: Vec<D>, ) -> Result<Self::Key, Self::Error>
Auto Trait Implementations§
impl<D> Freeze for PgKeyPoolStorage<D>
impl<D> !RefUnwindSafe for PgKeyPoolStorage<D>
impl<D> Send for PgKeyPoolStorage<D>
impl<D> Sync for PgKeyPoolStorage<D>
impl<D> Unpin for PgKeyPoolStorage<D>where
D: Unpin,
impl<D> !UnwindSafe for PgKeyPoolStorage<D>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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