diff --git a/src/extensions/consolidate.rs b/src/extensions/consolidate.rs index d98961d..7737903 100644 --- a/src/extensions/consolidate.rs +++ b/src/extensions/consolidate.rs @@ -19,10 +19,10 @@ impl Extension for Update { type Response = NoExtension; } -impl Transaction for DomainUpdate {} +impl Transaction> for DomainUpdate<'_> {} -impl Extension for UpdateWithNameStore { - type Response = NameStore; +impl<'a> Extension for UpdateWithNameStore<'a> { + type Response = NameStore<'a>; } #[derive(PartialEq, Debug)] @@ -78,12 +78,12 @@ impl Update { } } -impl UpdateWithNameStore { +impl UpdateWithNameStore<'_> { /// Create a new sync update with namestore request pub fn new(expiration: GMonthDay, subproduct: &str) -> Self { Self { sync: Update::new(expiration).data, - namestore: NameStore::new(subproduct).data, + namestore: NameStoreData::new(subproduct), } } } @@ -95,11 +95,11 @@ pub struct Update { } #[derive(Debug, Serialize)] -pub struct UpdateWithNameStore { +pub struct UpdateWithNameStore<'a> { #[serde(rename = "sync:update")] pub sync: UpdateData, #[serde(rename = "namestoreExt:namestoreExt")] - pub namestore: NameStoreData, + pub namestore: NameStoreData<'a>, } #[derive(Serialize, Debug)] diff --git a/src/extensions/namestore.rs b/src/extensions/namestore.rs index 96b54e6..dd19816 100644 --- a/src/extensions/namestore.rs +++ b/src/extensions/namestore.rs @@ -61,6 +61,16 @@ impl<'a> NameStore<'a> { } } +impl<'a> NameStoreData<'a> { + /// Create a new RGP restore report request + pub fn new(subproduct: &str) -> Self { + Self { + xmlns: XMLNS.into(), + subproduct: subproduct.to_owned().into(), + } + } +} + impl<'a> Extension for NameStore<'a> { type Response = NameStore<'static>; }