pub struct SimplyClient { /* private fields */ }Expand description
Async client for the Simply.com DNS API.
Provides methods to interact with DNS records using the Simply.com API. See: https://www.simply.com/en/docs/api/
Example usage:
let client = SimplyClient::new("account", "api_key");
// ...Implementations§
Source§impl SimplyClient
impl SimplyClient
Source§impl SimplyClient
impl SimplyClient
Sourcepub async fn list_dns_records(
&self,
domain: &str,
) -> Result<Vec<DnsRecord>, SimplyClientError>
pub async fn list_dns_records( &self, domain: &str, ) -> Result<Vec<DnsRecord>, SimplyClientError>
List all DNS records for a given domain.
§Arguments
domain- The domain to list DNS records for.
See: https://www.simply.com/en/docs/api/
Sourcepub async fn create_dns_record(
&self,
domain: &str,
req: CreateDnsRecordRequest,
) -> Result<Vec<DnsRecordId>, SimplyClientError>
pub async fn create_dns_record( &self, domain: &str, req: CreateDnsRecordRequest, ) -> Result<Vec<DnsRecordId>, SimplyClientError>
Create a new DNS record for a domain.
§Arguments
domain- The domain to create the DNS record under.req- The DNS record request payload.
See: https://www.simply.com/en/docs/api/
Sourcepub async fn update_dns_record(
&self,
domain: &str,
record_id: DnsRecordId,
req: UpdateDnsRecordRequest,
) -> Result<(), SimplyClientError>
pub async fn update_dns_record( &self, domain: &str, record_id: DnsRecordId, req: UpdateDnsRecordRequest, ) -> Result<(), SimplyClientError>
Update an existing DNS record for a domain.
§Arguments
domain- The domain the DNS record belongs to.record_id- The ID of the DNS record to update.req- The updated DNS record payload.
See: https://www.simply.com/en/docs/api/
Sourcepub async fn delete_dns_record(
&self,
domain: &str,
record_id: DnsRecordId,
) -> Result<(), SimplyClientError>
pub async fn delete_dns_record( &self, domain: &str, record_id: DnsRecordId, ) -> Result<(), SimplyClientError>
Delete a DNS record for a domain.
§Arguments
domain- The domain the DNS record belongs to.record_id- The ID of the DNS record to delete.
See: https://www.simply.com/en/docs/api/
Auto Trait Implementations§
impl !RefUnwindSafe for SimplyClient
impl !UnwindSafe for SimplyClient
impl Freeze for SimplyClient
impl Send for SimplyClient
impl Sync for SimplyClient
impl Unpin for SimplyClient
impl UnsafeUnpin for SimplyClient
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