pub struct Service {
pub il: Interloper,
pub store: Store,
pub fleet: Option<Arc<HealthSync>>,
}Fields§
§il: Interloper§store: Store§fleet: Option<Arc<HealthSync>>Set in fleet mode (Postgres): health shared with the other instances.
Implementations§
Source§impl Service
impl Service
pub fn new(il: Interloper, store: Store) -> Arc<Self> ⓘ
pub fn with_fleet( il: Interloper, store: Store, fleet: Option<Arc<HealthSync>>, ) -> Arc<Self> ⓘ
pub async fn create(&self, req: &Request) -> Result<Address, ApiError>
Sourcepub async fn inbox(&self, value: &str) -> Result<Inbox, ApiError>
pub async fn inbox(&self, value: &str) -> Result<Inbox, ApiError>
A live inbox for a stored address. The provider is looked up by name, so the object serving a request is not the one that issued the address (in fleet mode, not even the same process).
Sourcepub async fn clear_quarantine(&self, provider: &str) -> Result<bool, ApiError>
pub async fn clear_quarantine(&self, provider: &str) -> Result<bool, ApiError>
Return a quarantined provider to routing; fleet-wide in fleet mode.
pub async fn get_message( &self, value: &str, id: &str, ) -> Result<(Message, Option<String>), ApiError>
Sourcepub async fn wait(
&self,
value: &str,
timeout: Duration,
pattern: Option<&Regex>,
want_otp: bool,
filter: &MailFilter,
) -> Result<Option<(Message, Option<String>)>, ApiError>
pub async fn wait( &self, value: &str, timeout: Duration, pattern: Option<&Regex>, want_otp: bool, filter: &MailFilter, ) -> Result<Option<(Message, Option<String>)>, ApiError>
Hold until matching mail arrives or timeout passes. Ok(None) means
nothing arrived in time: a normal answer, not an error. With
want_otp, mail without a code is skipped: a caller waiting for a code
does not want the newsletter that arrived first.
Auto Trait Implementations§
impl !Freeze for Service
impl !RefUnwindSafe for Service
impl !UnwindSafe for Service
impl Forget for Service
impl Move for Service
impl Send for Service
impl Sync for Service
impl Unpin for Service
impl UnsafeUnpin for Service
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