pub struct PostgresBackend { /* private fields */ }Expand description
Complete PostgreSQL storage backend with connection pooling
Implementations§
Source§impl PostgresBackend
impl PostgresBackend
Sourcepub async fn new(database_url: &str) -> Result<Self>
pub async fn new(database_url: &str) -> Result<Self>
Create a new PostgreSQL backend with default configuration
Sourcepub async fn with_config(
database_url: &str,
config: PostgresConfig,
) -> Result<Self>
pub async fn with_config( database_url: &str, config: PostgresConfig, ) -> Result<Self>
Create a new PostgreSQL backend with custom configuration
Sourcepub async fn init_schema(&self) -> Result<()>
pub async fn init_schema(&self) -> Result<()>
Initialize database schema with migrations
Sourcepub fn idle_connections(&self) -> usize
pub fn idle_connections(&self) -> usize
Get idle connections count
Trait Implementations§
Source§impl StorageBackend for PostgresBackend
impl StorageBackend for PostgresBackend
Source§fn mailbox_store(&self) -> Arc<dyn MailboxStore>
fn mailbox_store(&self) -> Arc<dyn MailboxStore>
Get mailbox store
Source§fn message_store(&self) -> Arc<dyn MessageStore>
fn message_store(&self) -> Arc<dyn MessageStore>
Get message store
Source§fn metadata_store(&self) -> Arc<dyn MetadataStore>
fn metadata_store(&self) -> Arc<dyn MetadataStore>
Get metadata store
Auto Trait Implementations§
impl Freeze for PostgresBackend
impl !RefUnwindSafe for PostgresBackend
impl Send for PostgresBackend
impl Sync for PostgresBackend
impl Unpin for PostgresBackend
impl UnsafeUnpin for PostgresBackend
impl !UnwindSafe for PostgresBackend
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