pub struct DomainCreateRequest {
pub domain: String,
pub years: u32,
pub registrant: Contact,
pub tech: Contact,
pub admin: Contact,
pub aux_billing: Contact,
pub nameservers: Vec<String>,
pub add_free_whoisguard: bool,
pub enable_whoisguard: bool,
}Expand description
A request to register a domain via Domains::create.
Fields§
§domain: StringThe domain to register (for example "example.com").
years: u32The number of years to register for.
registrant: ContactThe registrant contact.
tech: ContactThe technical contact.
admin: ContactThe administrative contact.
aux_billing: ContactThe billing contact.
nameservers: Vec<String>Custom nameservers. When empty, Namecheap’s default DNS is used.
add_free_whoisguard: boolWhether to request the free WhoisGuard privacy add-on with the order.
enable_whoisguard: boolWhether to enable WhoisGuard privacy once the order completes.
Implementations§
Source§impl DomainCreateRequest
impl DomainCreateRequest
Sourcepub fn new(domain: impl Into<String>, years: u32, contact: Contact) -> Self
pub fn new(domain: impl Into<String>, years: u32, contact: Contact) -> Self
Builds a registration request that reuses contact for all four
required contact roles, with WhoisGuard privacy enabled.
Sourcepub fn with_nameservers<I, S>(self, nameservers: I) -> Self
pub fn with_nameservers<I, S>(self, nameservers: I) -> Self
Sets custom nameservers for the domain.
Sourcepub fn with_whois_privacy(self, enabled: bool) -> Self
pub fn with_whois_privacy(self, enabled: bool) -> Self
Enables or disables the WhoisGuard privacy add-on (enabled by default).
Trait Implementations§
Source§impl Clone for DomainCreateRequest
impl Clone for DomainCreateRequest
Source§fn clone(&self) -> DomainCreateRequest
fn clone(&self) -> DomainCreateRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DomainCreateRequest
impl RefUnwindSafe for DomainCreateRequest
impl Send for DomainCreateRequest
impl Sync for DomainCreateRequest
impl Unpin for DomainCreateRequest
impl UnsafeUnpin for DomainCreateRequest
impl UnwindSafe for DomainCreateRequest
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