DnsProvider

Trait DnsProvider 

Source
pub trait DnsProvider {
    // Required methods
    fn get_record<T>(&self, rtype: RecordType, host: &str) -> Result<Option<T>>
       where T: DeserializeOwned;
    fn create_record<T>(
        &self,
        rtype: RecordType,
        host: &str,
        record: &T,
    ) -> Result<()>
       where T: Serialize + DeserializeOwned + Display + Clone;
    fn update_record<T>(
        &self,
        rtype: RecordType,
        host: &str,
        record: &T,
    ) -> Result<()>
       where T: Serialize + DeserializeOwned + Display + Clone;
    fn delete_record(&self, rtype: RecordType, host: &str) -> Result<()>;

    // Provided methods
    fn get_txt_record(&self, host: &str) -> Result<Option<String>> { ... }
    fn create_txt_record(&self, host: &str, record: &String) -> Result<()> { ... }
    fn update_txt_record(&self, host: &str, record: &String) -> Result<()> { ... }
    fn delete_txt_record(&self, host: &str) -> Result<()> { ... }
    fn get_a_record(&self, host: &str) -> Result<Option<Ipv4Addr>> { ... }
    fn create_a_record(&self, host: &str, record: &Ipv4Addr) -> Result<()> { ... }
    fn update_a_record(&self, host: &str, record: &Ipv4Addr) -> Result<()> { ... }
    fn delete_a_record(&self, host: &str) -> Result<()> { ... }
}

Required Methods§

Source

fn get_record<T>(&self, rtype: RecordType, host: &str) -> Result<Option<T>>

Source

fn create_record<T>( &self, rtype: RecordType, host: &str, record: &T, ) -> Result<()>

Source

fn update_record<T>( &self, rtype: RecordType, host: &str, record: &T, ) -> Result<()>

Source

fn delete_record(&self, rtype: RecordType, host: &str) -> Result<()>

Provided Methods§

Source

fn get_txt_record(&self, host: &str) -> Result<Option<String>>

Source

fn create_txt_record(&self, host: &str, record: &String) -> Result<()>

Source

fn update_txt_record(&self, host: &str, record: &String) -> Result<()>

Source

fn delete_txt_record(&self, host: &str) -> Result<()>

Source

fn get_a_record(&self, host: &str) -> Result<Option<Ipv4Addr>>

Source

fn create_a_record(&self, host: &str, record: &Ipv4Addr) -> Result<()>

Source

fn update_a_record(&self, host: &str, record: &Ipv4Addr) -> Result<()>

Source

fn delete_a_record(&self, host: &str) -> Result<()>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§