pub struct Client { /* private fields */ }
Expand description
Entrypoint for interacting with the API client.
Implementations§
Source§impl Client
impl Client
Sourcepub fn new<T>(token: T) -> Selfwhere
T: ToString,
pub fn new<T>(token: T) -> Selfwhere
T: ToString,
Create a new Client struct.
§Panics
This function will panic if the internal http client fails to create
Sourcepub fn with_host_override<H>(&mut self, host: H) -> &mut Selfwhere
H: ToString,
pub fn with_host_override<H>(&mut self, host: H) -> &mut Selfwhere
H: ToString,
Override the host for all endpoins in the client.
Sourcepub fn remove_host_override(&mut self) -> &mut Self
pub fn remove_host_override(&mut self) -> &mut Self
Disables the global host override for the client.
pub fn get_host_override(&self) -> Option<&str>
Sourcepub fn new_from_env() -> Self
pub fn new_from_env() -> Self
Create a new Client struct from environment variables.
The following environment variables are expected to be set:
SENDGRID_API_KEY
§Panics
This function will panic if the expected environment variables can not be found
pub fn alerts(&self) -> Alerts
pub fn api_key_permissions(&self) -> ApiKeyPermissions
pub fn api_keys(&self) -> ApiKeys
pub fn blocks_api(&self) -> BlocksApi
pub fn bounces_api(&self) -> BouncesApi
pub fn campaigns_api(&self) -> CampaignsApi
pub fn cancel_scheduled_sends(&self) -> CancelScheduledSends
pub fn categories(&self) -> Categories
pub fn certificates(&self) -> Certificates
pub fn contacts(&self) -> Contacts
pub fn contacts_api_custom_fields(&self) -> ContactsApiCustomFields
pub fn contacts_api_lists(&self) -> ContactsApiLists
pub fn contacts_api_recipients(&self) -> ContactsApiRecipients
pub fn contacts_api_segments(&self) -> ContactsApiSegments
pub fn csv_ui_only(&self) -> CsvUiOnly
pub fn custom_fields(&self) -> CustomFields
pub fn designs_api(&self) -> DesignsApi
pub fn domain_authentication(&self) -> DomainAuthentication
pub fn email_address_validation(&self) -> EmailAddressValidation
pub fn email_cname_records(&self) -> EmailCnameRecords
pub fn invalid_emails_api(&self) -> InvalidEmailsApi
pub fn ip_access_management(&self) -> IpAccessManagement
pub fn ip_addresses(&self) -> IpAddresses
pub fn ip_pools(&self) -> IpPools
pub fn ip_warmup(&self) -> IpWarmup
pub fn link_branding(&self) -> LinkBranding
pub fn lists(&self) -> Lists
pub fn mail_send(&self) -> MailSend
pub fn marketing_campaigns_stats(&self) -> MarketingCampaignsStats
pub fn query(&self) -> Query
pub fn reverse_dns(&self) -> ReverseDns
pub fn segmenting_contacts(&self) -> SegmentingContacts
pub fn segmenting_contacts_beta(&self) -> SegmentingContactsBeta
pub fn send_test_email(&self) -> SendTestEmail
pub fn sender_identities_api(&self) -> SenderIdentitiesApi
pub fn sender_verification(&self) -> SenderVerification
pub fn senders(&self) -> Senders
pub fn settings_enforced_tls(&self) -> SettingsEnforcedTls
pub fn settings_inbound_parse(&self) -> SettingsInboundParse
pub fn settings_mail(&self) -> SettingsMail
pub fn settings_partner(&self) -> SettingsPartner
pub fn settings_tracking(&self) -> SettingsTracking
pub fn single_sends(&self) -> SingleSends
pub fn single_sign_on_settings(&self) -> SingleSignOnSettings
pub fn single_sign_on_teammates(&self) -> SingleSignOnTeammates
pub fn spam_reports_api(&self) -> SpamReportsApi
pub fn stats(&self) -> Stats
pub fn subuser_monitor_settings(&self) -> SubuserMonitorSettings
pub fn subuser_statistics(&self) -> SubuserStatistics
pub fn subusers_api(&self) -> SubusersApi
pub fn suppressions(&self) -> Suppressions
pub fn suppressions_global(&self) -> SuppressionsGlobal
pub fn suppressions_unsubscribe_groups(&self) -> SuppressionsUnsubscribeGroups
pub fn teammates(&self) -> Teammates
pub fn transactional_templates(&self) -> TransactionalTemplates
pub fn transactional_templates_versions(&self) -> TransactionalTemplatesVersions
pub fn users_api(&self) -> UsersApi
pub fn webhooks(&self) -> Webhooks
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe 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