mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-14 04:42:15 +00:00
dav: Refactor proppatch, remove InvalidProperty trait
This commit is contained in:
@@ -28,8 +28,8 @@ pub enum XmlDeError {
|
||||
Other(String),
|
||||
#[error("Invalid variant: {0}")]
|
||||
InvalidVariant(String),
|
||||
#[error("Invalid field name: {0}")]
|
||||
InvalidFieldName(String),
|
||||
#[error("Invalid field name in {0}: {1}")]
|
||||
InvalidFieldName(&'static str, String),
|
||||
#[error(transparent)]
|
||||
InvalidValue(#[from] crate::value::ParseValueError),
|
||||
}
|
||||
|
||||
@@ -36,6 +36,13 @@ impl XmlDeserialize for () {
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub struct Unparsed(BytesStart<'static>);
|
||||
|
||||
impl Unparsed {
|
||||
pub fn tag_name(&self) -> String {
|
||||
// TODO: respect namespace?
|
||||
String::from_utf8_lossy(self.0.local_name().as_ref()).to_string()
|
||||
}
|
||||
}
|
||||
|
||||
impl XmlDeserialize for Unparsed {
|
||||
fn deserialize<R: BufRead>(
|
||||
reader: &mut quick_xml::NsReader<R>,
|
||||
|
||||
Reference in New Issue
Block a user