pub struct EmailRelayClient { /* private fields */ }Expand description
OutboundMail over this deployment’s web Worker (apps/web), which
hosts EmailRelayService and owns the actual mail-provider credential.
base_url is the Worker’s own origin (no trailing slash; RELAY_MOUNT_PREFIX
is appended to reach the service); token is the shared secret both sides
authenticate the call with — the Worker fails the request closed if it
does not match (or is unset on either side).
Implementations§
Source§impl EmailRelayClient
impl EmailRelayClient
Sourcepub fn new(base_url: &str, token: &str) -> Result<Self, RelayConfigError>
pub fn new(base_url: &str, token: &str) -> Result<Self, RelayConfigError>
Build a client against the web Worker’s base_url, authenticating
with the shared token.
§Errors
Returns RelayConfigError when base_url doesn’t parse, token
isn’t a valid header value, or the TLS transport fails to build for
an https origin.
Trait Implementations§
Source§impl Clone for EmailRelayClient
impl Clone for EmailRelayClient
Source§fn clone(&self) -> EmailRelayClient
fn clone(&self) -> EmailRelayClient
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 EmailRelayClient
impl Debug for EmailRelayClient
Source§impl OutboundMail for EmailRelayClient
impl OutboundMail for EmailRelayClient
Auto Trait Implementations§
impl !RefUnwindSafe for EmailRelayClient
impl !UnwindSafe for EmailRelayClient
impl Freeze for EmailRelayClient
impl Send for EmailRelayClient
impl Sync for EmailRelayClient
impl Unpin for EmailRelayClient
impl UnsafeUnpin for EmailRelayClient
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