rustical_dav: Make actix-web a completely optional dependency

This commit is contained in:
Lennart
2025-06-02 21:58:46 +02:00
parent 05ff2536f6
commit 9836a696ad
10 changed files with 87 additions and 36 deletions

View File

@@ -1,13 +1,12 @@
use std::collections::HashMap;
use crate::xml::TagList;
#[cfg(feature = "actix")]
use actix_web::{
body::BoxBody,
http::{header::ContentType, StatusCode},
HttpRequest, HttpResponse, Responder, ResponseError,
HttpRequest, HttpResponse, Responder, ResponseError, body::BoxBody, http::header::ContentType,
};
use http::StatusCode;
use quick_xml::name::Namespace;
use rustical_xml::{XmlRootTag, XmlSerialize, XmlSerializeRoot};
use std::collections::HashMap;
#[derive(XmlSerialize)]
pub struct PropTagWrapper<T: XmlSerialize>(#[xml(flatten, ty = "untagged")] pub Vec<T>);
@@ -109,6 +108,7 @@ impl<T1: XmlSerialize, T2: XmlSerialize> Default for MultistatusElement<T1, T2>
}
}
#[cfg(feature = "actix")]
impl<T1: XmlSerialize, T2: XmlSerialize> Responder for MultistatusElement<T1, T2> {
type Body = BoxBody;