pub struct Resend {
pub emails: EmailsSvc,
pub batch: BatchSvc,
pub api_keys: ApiKeysSvc,
pub segments: SegmentsSvc,
pub contacts: ContactsSvc,
pub domains: DomainsSvc,
pub broadcasts: BroadcastsSvc,
pub templates: TemplateSvc,
pub topics: TopicsSvc,
pub receiving: ReceivingSvc,
pub webhooks: WebhookSvc,
}Expand description
The Resend client.
Fields§
§emails: EmailsSvcResend APIs for /emails endpoints.
batch: BatchSvcResend APIs for the batch /emails endpoints.
api_keys: ApiKeysSvcResend APIs for /api-keys endpoints.
segments: SegmentsSvcResend APIs for /audiences endpoints.
contacts: ContactsSvcResend APIs for /audiences/:id/contacts endpoints.
domains: DomainsSvcResend APIs for /domains endpoints.
broadcasts: BroadcastsSvcResend APIs for /broadcasts endpoints.
templates: TemplateSvcResend APIs for /templates endpoints.
topics: TopicsSvcResend APIs for /topics endpoints.
receiving: ReceivingSvcResend APIs for /emails/receiving endpoints.
webhooks: WebhookSvcResend APIs for /webhooks endpoints.
Implementations§
Source§impl Resend
impl Resend
Sourcepub fn with_client(api_key: &str, client: ReqwestClient) -> Self
pub fn with_client(api_key: &str, client: ReqwestClient) -> Self
Creates a new Resend client with a provided reqwest::Client.
§Panics
- Panics if the environment variable
RESEND_BASE_URLis set but is not a validURL.
Sourcepub fn with_config(config: Config) -> Self
pub fn with_config(config: Config) -> Self
Creates a new Resend client with a provided Config.
Use ConfigBuilder::new to construct a Config instance.
§Panics
- Panics if the base url has not been set with
ConfigBuilder::base_urland the environment variableRESEND_BASE_URLis set but is not a validURL.
Sourcepub fn user_agent(&self) -> &str
pub fn user_agent(&self) -> &str
Returns the reference to the used User-Agent header value.
Sourcepub fn base_url(&self) -> &str
pub fn base_url(&self) -> &str
Returns the reference to the used base URL.
§Notes
Use the RESEND_BASE_URL environment variable to override.
Sourcepub fn client(&self) -> ReqwestClient
pub fn client(&self) -> ReqwestClient
Returns the underlying reqwest::Client.