pub struct Client {
pub http_client: Client,
pub api_base_url: &'static str,
pub account_api_token: Option<String>,
}Fields§
§http_client: Client§api_base_url: &'static str§account_api_token: Option<String>Implementations§
Source§impl Client
impl Client
Sourcepub fn new(account_api_token: Option<String>) -> Client
pub fn new(account_api_token: Option<String>) -> Client
Builds a client for the Postmark API.
Installs the stdx rustls CryptoProvider as the process default (if
none is installed yet) before creating the underlying reqwest client,
because reqwest is compiled with the rustls-no-provider feature and
would otherwise panic for lack of a cryptography provider.
Source§impl Client
impl Client
pub async fn send_email( &self, server_token: String, email: Email, ) -> Result<SendEmailResponse, ApiError>
Auto Trait Implementations§
impl !RefUnwindSafe for Client
impl !UnwindSafe for Client
impl Freeze for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnsafeUnpin for Client
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