dav: Convert is_collection const to function which will make filesystem access easier

This commit is contained in:
Lennart
2025-06-14 15:21:10 +02:00
parent ca5891314c
commit 529f36ad99
8 changed files with 23 additions and 9 deletions

View File

@@ -97,7 +97,9 @@ impl Resource for CalendarResource {
type Error = Error;
type Principal = User;
const IS_COLLECTION: bool = true;
fn is_collection(&self) -> bool {
true
}
fn get_resourcetype(&self) -> Resourcetype {
if self.cal.subscription_url.is_none() {

View File

@@ -27,7 +27,9 @@ impl Resource for CalendarObjectResource {
type Error = Error;
type Principal = User;
const IS_COLLECTION: bool = false;
fn is_collection(&self) -> bool {
false
}
fn get_resourcetype(&self) -> Resourcetype {
Resourcetype(&[])

View File

@@ -29,7 +29,9 @@ impl Resource for PrincipalResource {
type Error = Error;
type Principal = User;
const IS_COLLECTION: bool = true;
fn is_collection(&self) -> bool {
true
}
fn get_resourcetype(&self) -> Resourcetype {
Resourcetype(&[