Struct panorama::mail::store::MailStore[][src]

pub struct MailStore {
    config: Arc<RwLock<Option<Config>>>,
    inner: Arc<RwLock<Option<MailStoreInner>>>,
    handle: Arc<JoinHandle<()>>,
    store_out_tx: Arc<Sender<Option<MailStoreUpdate>>>,
    pub store_out_rx: Receiver<Option<MailStoreUpdate>>,
}

Manages email storage on disk, for both database and caches

This struct is clone-safe: cloning it will just return a reference to the same data structure

Fields

config: Arc<RwLock<Option<Config>>>inner: Arc<RwLock<Option<MailStoreInner>>>handle: Arc<JoinHandle<()>>store_out_tx: Arc<Sender<Option<MailStoreUpdate>>>store_out_rx: Receiver<Option<MailStoreUpdate>>

A receiver for listening to updates to the mail store

Implementations

impl MailStore[src]

pub fn new(config_watcher: ConfigWatcher) -> Self[src]

Creates a new MailStore

pub async fn nuke_old_uidvalidity(&self, current: usize)[src]

Nuke all messages with an invalid UIDVALIDITY

pub async fn try_identify_email(
    &self,
    acct: impl AsRef<str>,
    folder: impl AsRef<str>,
    uid: u32,
    uidvalidity: u32,
    message_id: Option<&str>
) -> Result<Option<u32>>
[src]

Given a UID and optional message-id try to identify a particular message

pub async fn store_email(
    &self,
    acct: impl AsRef<str>,
    folder: impl AsRef<str>,
    uid: u32,
    uidvalidity: u32,
    attrs: Vec<AttributeValue>
) -> Result<()>
[src]

Stores the given email

pub async fn handle_mail_event(&self, evt: MailEvent) -> Result<()>[src]

Event handerl

pub async fn list_accounts(&self) -> IndexMap<String, Arc<AccountRef>>[src]

Return a map of the accounts that are currently being tracked as well as a reference to the account handles themselves

Trait Implementations

impl Clone for MailStore[src]

impl Debug for MailStore[src]

Auto Trait Implementations

impl !RefUnwindSafe for MailStore[src]

impl Send for MailStore[src]

impl Sync for MailStore[src]

impl Unpin for MailStore[src]

impl !UnwindSafe for MailStore[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<Id> AsId<Id> for Id where
    Id: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<'_, T> Captures<'_> for T[src]

impl<T> Conv for T

impl<T> Conv for T

impl<Choices> CoproductSubsetter<CNil, HNil> for Choices

type Remainder = Choices

impl<T> Downcast for T where
    T: Any

impl<T> DowncastArc for T where
    T: Downcast + Send + Sync
[src]

impl<T> DowncastSync for T where
    T: Send + Sync + Any

impl<T> FmtForward for T

impl<T> From<T> for T[src]

impl<D, T> FromPtr<D> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U, I> LiftInto<U, I> for T where
    U: LiftFrom<T, I>, 

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<Source> Sculptor<HNil, HNil> for Source

type Remainder = Source

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> TryConv for T

impl<T> TryConv for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,