mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-14 08:12:24 +00:00
Refactoring: Lots of fixes still necessary to get it into a working state
This commit is contained in:
@@ -13,8 +13,8 @@ use strum::VariantNames;
|
||||
// A resource cannot be none, only Methods like PROPFIND, GET, REPORT, etc. can be exposed
|
||||
// A resource exists
|
||||
#[async_trait(?Send)]
|
||||
pub trait Resource: Sized {
|
||||
type MemberType: Resource;
|
||||
pub trait OldResource: Sized {
|
||||
type MemberType: OldResource;
|
||||
type UriComponents: Sized; // defines how the resource URI maps to parameters, i.e. /{principal}/{calendar} -> (String, String)
|
||||
type PropType: FromStr + VariantNames + Into<&'static str> + Clone;
|
||||
type PropResponse: Serialize;
|
||||
@@ -66,7 +66,7 @@ pub trait HandlePropfind {
|
||||
fn propfind(&self, props: Vec<&str>) -> Result<impl Serialize>;
|
||||
}
|
||||
|
||||
impl<R: Resource> HandlePropfind for R {
|
||||
impl<R: OldResource> HandlePropfind for R {
|
||||
fn propfind(&self, props: Vec<&str>) -> Result<impl Serialize> {
|
||||
let mut props = props.into_iter().unique().collect_vec();
|
||||
if props.contains(&"allprops") {
|
||||
|
||||
Reference in New Issue
Block a user