1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//! PostgreSQL reference implementation of [`MailboxStore`](crate::store::MailboxStore).
//!
//! [`PgMailboxStore`] satisfies the portable [`MailboxStore`] trait AND exposes
//! a set of mailrs-specific inherent methods (PG-EXT) for product features that
//! are not part of the portable contract: thread-level UI state (pin / archive
//! / snooze), email-analysis annotations, contact tracking, semantic search,
//! HTML / preview content projections.
//!
//! Programs that want to be store-agnostic should program against
//! [`&dyn MailboxStore`](crate::store::MailboxStore). Programs that need the
//! mailrs-specific features take `&PgMailboxStore` directly. README documents
//! the split.
pub
use PgPool;
/// PostgreSQL-backed mailbox metadata store.
///
/// Wraps a [`sqlx::PgPool`] and implements [`MailboxStore`](crate::store::MailboxStore)
/// plus a number of mailrs-specific inherent methods. See the module docs for
/// the trait / PG-EXT distinction.
// Re-export PG-EXT public types so callers reach them via
// `mailrs_mailbox::pg::{ContactInfo, EmailAnalysisInput}`.
pub use crateEmailAnalysisInput;
pub use crateContactInfo;
// NOTE: `impl MailboxStore for PgMailboxStore` is added in stage 2b together
// with server adaptation. Keeping them in lockstep avoids the complexity of
// maintaining both MessageMeta and Message conversion paths during 2a.