mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-14 08:12:24 +00:00
dav: Make reusable for other projects
This commit is contained in:
22
crates/dav_push/src/prop.rs
Normal file
22
crates/dav_push/src/prop.rs
Normal file
@@ -0,0 +1,22 @@
|
||||
use rustical_xml::XmlSerialize;
|
||||
|
||||
#[derive(Debug, Clone, XmlSerialize, PartialEq)]
|
||||
pub enum Transport {
|
||||
#[xml(ns = "rustical_dav::namespace::NS_DAVPUSH")]
|
||||
WebPush,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, XmlSerialize, PartialEq)]
|
||||
pub struct Transports {
|
||||
#[xml(flatten, ty = "untagged")]
|
||||
#[xml(ns = "crate::namespace::NS_DAVPUSH")]
|
||||
transports: Vec<Transport>,
|
||||
}
|
||||
|
||||
impl Default for Transports {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
transports: vec![Transport::WebPush],
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user