Struct dnsimple::dnsimple::zones::Zones

source ·
pub struct Zones<'a> {
    pub client: &'a Client,
}
Expand description

The Zones Service handles the zone distribution of the DNSimple API.

See API Documentation: zones

Fields§

§client: &'a Client

Implementations§

source§

impl Zones<'_>

source

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

Lists the zones in the account.

Arguments

account_id: The account ID

source

pub fn get_zone( &self, account_id: u64, zone: &str ) -> Result<DNSimpleResponse<Zone>, DNSimpleError>

Retrieve a zone

Arguments

account_id: The account ID zone: The zone name

source

pub fn get_zone_file( &self, account_id: u64, zone: &str ) -> Result<DNSimpleResponse<ZoneFile>, DNSimpleError>

Download a zone file

Arguments

account_id: The account ID zone: The zone name

source

pub fn check_zone_distribution( &self, account_id: u64, zone: &str ) -> Result<DNSimpleResponse<ZoneDistribution>, DNSimpleError>

Check zone distribution

Arguments

account_id: The account ID zone: The zone name

source§

impl Zones<'_>

source

pub fn list_zone_records( &self, account_id: u64, zone: &str, options: Option<RequestOptions> ) -> Result<DNSimpleResponse<Vec<ZoneRecord>>, DNSimpleError>

List zone records

Arguments

account_id: The account ID zone: The zone name

source

pub fn create_zone_record( &self, account_id: u64, zone: &str, payload: ZoneRecordPayload ) -> Result<DNSimpleResponse<ZoneRecord>, DNSimpleError>

Create a zone record

Arguments

account_id: The account ID zone: The zone name payload: The ZoneRecordPayload with the information to create the zone record

source

pub fn get_zone_record( &self, account_id: u64, zone: &str, record: u64 ) -> Result<DNSimpleResponse<ZoneRecord>, DNSimpleError>

Retrieve a zone record

Arguments

account_id: The account ID zone: The zone name record: The record id

source

pub fn update_zone_record( &self, account_id: u64, zone: &str, record: u64, payload: ZoneRecordUpdatePayload ) -> Result<DNSimpleResponse<ZoneRecord>, DNSimpleError>

Update a zone record

Arguments

account_id: The account ID zone: The zone name record: The record id payload: The ZoneRecordUpdatePayload with the information to create the zone record

source

pub fn delete_zone_record( &self, account_id: u64, zone: &str, record: u64 ) -> Result<DNSimpleEmptyResponse, DNSimpleError>

Delete a zone record

Arguments

account_id: The account ID zone: The zone name record: The record id

source

pub fn check_zone_record_distribution( &self, account_id: u64, zone: &str, record: u64 ) -> Result<DNSimpleResponse<ZoneDistribution>, DNSimpleError>

Check zone record distribution

Arguments

account_id: The account ID zone: The zone name record: The record id

Auto Trait Implementations§

§

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

§

impl<'a> Send for Zones<'a>

§

impl<'a> Sync for Zones<'a>

§

impl<'a> Unpin for Zones<'a>

§

impl<'a> !UnwindSafe for Zones<'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.