Zone

Struct Zone 

Source
pub struct Zone {
Show 19 fields pub created: String, pub id: String, pub is_secondary_dns: bool, pub legacy_dns_host: String, pub legacy_ns: Vec<String>, pub modified: String, pub name: String, pub ns: Vec<String>, pub owner: String, pub paused: bool, pub permission: String, pub project: String, pub records_count: i64, pub registrar: String, pub status: String, pub ttl: u32, pub txt_verification: TxtVerification, pub verified: String, pub zone_type: ZoneType,
}
Expand description

Represents a DNS zone.

§Examples

use hetzner::Zone;

let zone = Zone::new(
    "2023-01-01T00:00:00Z".to_string(),
    vec!["ns1.example.com".to_string(), "ns2.example.com".to_string()],
    "example.com".to_string(),
    "zone_id_123".to_string(),
    false,
    "legacy_dns_host".to_string(),
    vec!["legacy_ns1".to_string(), "legacy_ns2".to_string()],
    "2023-01-02T00:00:00Z".to_string(),
    "owner_id".to_string(),
    false,
    "read".to_string(),
    "project_id".to_string(),
    10,
    "registrar_name".to_string(),
    "active".to_string(),
    3600,
    hetzner::TxtVerification {
        name: "txt_name".to_string(),
        token: "txt_token".to_string(),
    },
    "unverified".to_string(),
    hetzner::ZoneType {
        description: "master".to_string(),
        id: "zone_type_id".to_string(),
        name: "zone_type_name".to_string(),
        prices: None,
    },
);

§Returns

A new Zone instance.

Fields§

§created: String

The creation timestamp of the DNS zone.

§id: String

The zone ID associated with the DNS zone.

§is_secondary_dns: bool

Indicates if the zone is a secondary DNS.

§legacy_dns_host: String

The legacy DNS host associated with the zone.

§legacy_ns: Vec<String>

The legacy name servers associated with the zone.

§modified: String

The last modified timestamp of the DNS zone.

§name: String

The name of the DNS zone.

§ns: Vec<String>

The name servers associated with the zone.

§owner: String

The owner of the DNS zone.

§paused: bool

Indicates if the zone is paused.

§permission: String

The permission level of the DNS zone.

§project: String

The project associated with the DNS zone.

§records_count: i64

The count of records in the DNS zone.

§registrar: String

The registrar of the DNS zone.

§status: String

The status of the DNS zone.

§ttl: u32

The time-to-live (TTL) value of the DNS zone.

§txt_verification: TxtVerification

The TXT verification details of the DNS zone.

§verified: String

The verification status of the DNS zone.

§zone_type: ZoneType

The zone type details of the DNS zone.

Implementations§

Source§

impl Zone

Source

pub fn new( created: String, ns: Vec<String>, name: String, id: String, is_secondary_dns: bool, legacy_dns_host: String, legacy_ns: Vec<String>, modified: String, owner: String, paused: bool, permission: String, project: String, records_count: i64, registrar: String, status: String, ttl: u32, txt_verification: TxtVerification, verified: String, zone_type: ZoneType, ) -> Self

new creates a new Zone instance.

§Arguments
  • name - The name of the zone.
  • id - The ID of the zone.
  • is_secondary_dns - Indicates if the zone is a secondary DNS.
  • legacy_dns_host - The legacy DNS host associated with the zone.
  • legacy_ns - The legacy name servers associated with the zone.
  • modified - The last modified timestamp of the DNS zone.
  • owner - The owner of the DNS zone.
  • paused - Indicates if the zone is paused.
  • permission - The permission level of the DNS zone.
  • project - The project associated with the DNS zone.
  • records_count - The count of records in the DNS zone.
  • registrar - The registrar of the DNS zone.
  • status - The status of the DNS zone.
  • ttl - The TTL of the DNS zone.
  • txt_verification - The TXT verification details of the DNS zone.
  • verified - The verification status of the DNS zone.
  • zone_type - The type details of the DNS zone.
§Returns

A new Zone instance.

Trait Implementations§

Source§

impl Clone for Zone

Source§

fn clone(&self) -> Zone

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Zone

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Zone

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Zone

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl Freeze for Zone

§

impl RefUnwindSafe for Zone

§

impl Send for Zone

§

impl Sync for Zone

§

impl Unpin for Zone

§

impl UnwindSafe for Zone

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

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

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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,