mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-13 22:52:22 +00:00
dav: Outsource PrincipalResource AT to where it's actually needed
This commit is contained in:
@@ -100,10 +100,13 @@ impl DavPushExtension for CalendarResource {
|
||||
}
|
||||
}
|
||||
|
||||
impl CommonPropertiesExtension for CalendarResource {
|
||||
type PrincipalResource = PrincipalResource;
|
||||
}
|
||||
|
||||
impl Resource for CalendarResource {
|
||||
type Prop = CalendarPropWrapper;
|
||||
type Error = Error;
|
||||
type PrincipalResource = PrincipalResource;
|
||||
type Principal = User;
|
||||
|
||||
fn get_resourcetype(&self) -> Resourcetype {
|
||||
|
||||
@@ -51,10 +51,13 @@ pub struct CalendarObjectResource {
|
||||
pub principal: String,
|
||||
}
|
||||
|
||||
impl CommonPropertiesExtension for CalendarObjectResource {
|
||||
type PrincipalResource = PrincipalResource;
|
||||
}
|
||||
|
||||
impl Resource for CalendarObjectResource {
|
||||
type Prop = CalendarObjectPropWrapper;
|
||||
type Error = Error;
|
||||
type PrincipalResource = PrincipalResource;
|
||||
type Principal = User;
|
||||
|
||||
fn get_resourcetype(&self) -> Resourcetype {
|
||||
|
||||
@@ -24,10 +24,13 @@ pub enum PrincipalPropWrapper {
|
||||
Common(CommonPropertiesProp),
|
||||
}
|
||||
|
||||
impl CommonPropertiesExtension for CalendarSetResource {
|
||||
type PrincipalResource = PrincipalResource;
|
||||
}
|
||||
|
||||
impl Resource for CalendarSetResource {
|
||||
type Prop = PrincipalPropWrapper;
|
||||
type Error = Error;
|
||||
type PrincipalResource = PrincipalResource;
|
||||
type Principal = User;
|
||||
|
||||
fn get_resourcetype(&self) -> Resourcetype {
|
||||
|
||||
@@ -61,10 +61,13 @@ impl NamedRoute for PrincipalResource {
|
||||
}
|
||||
}
|
||||
|
||||
impl CommonPropertiesExtension for PrincipalResource {
|
||||
type PrincipalResource = Self;
|
||||
}
|
||||
|
||||
impl Resource for PrincipalResource {
|
||||
type Prop = PrincipalPropWrapper;
|
||||
type Error = Error;
|
||||
type PrincipalResource = PrincipalResource;
|
||||
type Principal = User;
|
||||
|
||||
fn get_resourcetype(&self) -> Resourcetype {
|
||||
|
||||
Reference in New Issue
Block a user