pub struct Contacts<'a> {
    pub client: &'a Client,
}
Expand description

The Contacts Service handles the contacts endpoint of the DNSimple API.

See API Documentation: contacts

Fields§

§client: &'a Client

Implementations§

source§

impl Contacts<'_>

source

pub fn list_contacts( &self, account_id: u64, options: Option<RequestOptions> ) -> Result<DNSimpleResponse<Vec<Contact>>, DNSimpleError>

Lists the contacts in the account.

Arguments

account_id: The account ID options: The RequestOptions - Sort: id, label, email

source

pub fn create_contact( &self, account_id: u64, payload: ContactPayload ) -> Result<DNSimpleResponse<Contact>, DNSimpleError>

Create a contact in the account.

Arguments

account_id: The account ID payload: The ContactPayload with the information needed to create the contact

source

pub fn get_contact( &self, account_id: u64, contact: u64 ) -> Result<DNSimpleResponse<Contact>, DNSimpleError>

Retrieve a contact

Arguments

account_id: The account ID contact: The contact id

source

pub fn update_contact( &self, account_id: u64, contact: u64, payload: ContactPayload ) -> Result<DNSimpleResponse<Contact>, DNSimpleError>

Update a contact

Arguments

account_id: The account ID contact: The contact id payload: The ContactPayload with the information needed to update the contact

source

pub fn delete_contact( &self, account_id: u64, contact: u64 ) -> Result<DNSimpleEmptyResponse, DNSimpleError>

Delete a contact

Arguments

account_id: The account ID contact: The contact id

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for Contacts<'a>

§

impl<'a> Send for Contacts<'a>

§

impl<'a> Sync for Contacts<'a>

§

impl<'a> Unpin for Contacts<'a>

§

impl<'a> !UnwindSafe for Contacts<'a>

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.