diff options
author | HimbeerserverDE <himbeerserverde@gmail.com> | 2022-10-22 15:29:29 +0200 |
---|---|---|
committer | HimbeerserverDE <himbeerserverde@gmail.com> | 2022-10-22 15:29:29 +0200 |
commit | 0e1befd43c2109220570338a1fe30539a13170e4 (patch) | |
tree | cd10d874ba50af661ec7872239eae4e3f7ccf3b7 | |
parent | 1cbadb245701a76d2be9d071bc7234146340f95c (diff) |
use std::string::String instead of &str in calls
-rw-r--r-- | src/call/nameserver.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/call/nameserver.rs b/src/call/nameserver.rs index 2509eba..2e1a7e3 100644 --- a/src/call/nameserver.rs +++ b/src/call/nameserver.rs @@ -5,7 +5,7 @@ use std::collections::BTreeMap; use std::fmt; /// The DNS record type. -#[derive(Clone, Copy, Debug)] +#[derive(Clone, Debug)] pub enum RecordType { A, Aaaa, @@ -104,20 +104,20 @@ impl TryFrom<String> for RecordType { /// Search parameters to find nameserver records /// the account has access to. -#[derive(Clone, Copy, Debug)] -pub struct RecordInfo<'a> { - pub domain_name: &'a str, +#[derive(Clone, Debug)] +pub struct RecordInfo { + pub domain_name: String, pub domain_id: i32, pub record_id: i32, pub record_type: RecordType, - pub name: &'a str, - pub content: &'a str, + pub name: String, + pub content: String, pub ttl: i32, pub priority: i32, } -impl From<RecordInfo<'_>> for xmlrpc::Value { - fn from(info: RecordInfo<'_>) -> Self { +impl From<RecordInfo> for xmlrpc::Value { + fn from(info: RecordInfo) -> Self { let mut map = BTreeMap::new(); map.insert("domain".into(), info.domain_name.into()); @@ -132,7 +132,7 @@ impl From<RecordInfo<'_>> for xmlrpc::Value { } } -impl Call for RecordInfo<'_> { +impl Call for RecordInfo { fn method_name(&self) -> &'static str { "nameserver.info" } |