diff options
author | 2024-11-10 17:57:05 +0000 | |
---|---|---|
committer | 2024-11-10 17:57:05 +0000 | |
commit | 140af50536ebc32ae6461852daa2df0fc2d197ca (patch) | |
tree | e9d75cf617ed098fb3953407f806f5e38235b299 /src/element.rs | |
parent | be50ab4890993ae97bc79138364cd5e316566e46 (diff) | |
download | peanuts-140af50536ebc32ae6461852daa2df0fc2d197ca.tar.gz peanuts-140af50536ebc32ae6461852daa2df0fc2d197ca.tar.bz2 peanuts-140af50536ebc32ae6461852daa2df0fc2d197ca.zip |
implement reader testing
Diffstat (limited to '')
-rw-r--r-- | src/element.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/element.rs b/src/element.rs index 0e0b8f1..e93a0f3 100644 --- a/src/element.rs +++ b/src/element.rs @@ -9,19 +9,20 @@ use crate::{ // when are namespaces names chosen then if they are automatically calculated // namespaces are held by readers and writers. -#[derive(PartialEq, Eq, Hash, Clone)] +#[derive(PartialEq, Eq, Hash, Clone, Debug)] pub struct Namespace { pub prefix: Option<String>, pub namespace: String, } // names are qualified, they contain a reference to the namespace (held within the reader/writer) -#[derive(PartialEq, Eq, Hash, Clone)] +#[derive(PartialEq, Eq, Hash, Clone, Debug)] pub struct Name { pub namespace: Namespace, pub name: String, } +#[derive(Debug)] pub enum Content { Element(Element), Text(String), @@ -30,6 +31,7 @@ pub enum Content { } // should this be a trait? +#[derive(Debug)] pub struct Element { pub name: Name, // namespace: Name, |