pub struct TokioPostgresRateLimitStore { /* private fields */ }Implementations§
Source§impl TokioPostgresRateLimitStore
impl TokioPostgresRateLimitStore
Sourcepub fn from_connection(
connection: &TokioPostgresConnection,
table: impl Into<String>,
) -> Self
pub fn from_connection( connection: &TokioPostgresConnection, table: impl Into<String>, ) -> Self
Builds a rate-limit store from a shared connection bundle.
Sourcepub async fn connect(
database_url: &str,
table: impl Into<String>,
) -> Result<Self, RustAuthError>
pub async fn connect( database_url: &str, table: impl Into<String>, ) -> Result<Self, RustAuthError>
Connects for rate-limit-only usage when no TokioPostgresAdapter is needed.
Sourcepub fn connection(&self) -> &TokioPostgresConnection
pub fn connection(&self) -> &TokioPostgresConnection
Returns the shared connection used by this store.
Trait Implementations§
Source§impl Clone for TokioPostgresRateLimitStore
impl Clone for TokioPostgresRateLimitStore
Source§fn clone(&self) -> TokioPostgresRateLimitStore
fn clone(&self) -> TokioPostgresRateLimitStore
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TokioPostgresRateLimitStore
impl Debug for TokioPostgresRateLimitStore
Source§impl From<&TokioPostgresAdapter> for TokioPostgresRateLimitStore
impl From<&TokioPostgresAdapter> for TokioPostgresRateLimitStore
Source§fn from(adapter: &TokioPostgresAdapter) -> Self
fn from(adapter: &TokioPostgresAdapter) -> Self
Converts to this type from the input type.
Source§impl RateLimitStore for TokioPostgresRateLimitStore
impl RateLimitStore for TokioPostgresRateLimitStore
fn consume<'a>(&'a self, input: RateLimitConsumeInput) -> RateLimitFuture<'a>
Auto Trait Implementations§
impl !RefUnwindSafe for TokioPostgresRateLimitStore
impl !UnwindSafe for TokioPostgresRateLimitStore
impl Freeze for TokioPostgresRateLimitStore
impl Send for TokioPostgresRateLimitStore
impl Sync for TokioPostgresRateLimitStore
impl Unpin for TokioPostgresRateLimitStore
impl UnsafeUnpin for TokioPostgresRateLimitStore
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