xso-proc: completely overengineer everything for no good reason!

Well, not really, of course. All of this will make sense once we start
adding support for fields and non-struct types. Refactoring the code now
before we start to add actual member field parsing is much easier.

How do I know that this will work out? Well, my crystal ball knows it.
Don't believe me? Okay, ChatGPT told me ... Alright alright, I went
through the entire process of implementing this feature *twice* at this
point and have a pretty good idea of where to draw the abstraction lines
so that everything falls neatly into place. You'll have to trust me on
this one.

(Or, you know, check out old branches in my xmpp-rs repo. That might
work, too. `feature/derive-macro-streaming-full` might be a name to look
for if you dare.)
This commit is contained in:
Jonas Schäfer 2024-06-22 15:35:56 +02:00
commit 183bef5cf6
10 changed files with 930 additions and 135 deletions

View file

@ -44,7 +44,7 @@ mod tests {
FromElementError::Invalid(Error::Other(string)) => string,
_ => panic!(),
};
assert_eq!(message, "Unknown child in attention element.");
assert_eq!(message, "Unknown child in Attention element.");
}
#[cfg(not(feature = "disable-validation"))]
@ -58,7 +58,7 @@ mod tests {
FromElementError::Invalid(Error::Other(string)) => string,
_ => panic!(),
};
assert_eq!(message, "Unknown attribute in attention element.");
assert_eq!(message, "Unknown attribute in Attention element.");
}
#[test]