dav: Make the get_members function more ergonomic

This commit is contained in:
Lennart
2025-06-09 20:35:25 +02:00
parent 0feaaaaca1
commit 0595920809
14 changed files with 121 additions and 96 deletions

View File

@@ -6,7 +6,7 @@ use futures_util::future::BoxFuture;
use rustical_dav::{
extensions::{CommonPropertiesExtension, CommonPropertiesProp},
privileges::UserPrivilegeSet,
resource::{AxumMethods, PrincipalUri, Resource, ResourceService},
resource::{AxumMethods, PrincipalUri, Resource, ResourceName, ResourceService},
xml::Resourcetype,
};
use rustical_ical::AddressObject;
@@ -58,6 +58,12 @@ pub struct AddressObjectResource {
pub principal: String,
}
impl ResourceName for AddressObjectResource {
fn get_name(&self) -> String {
format!("{}.vcf", self.object.get_id())
}
}
impl Resource for AddressObjectResource {
type Prop = AddressObjectPropWrapper;
type Error = Error;