You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This can be useful for code that uses both xml::reader::Error and xml::writer::Error (e.g. a function that processes an input XML file and outputs a different XML file). In that case, the code needs to handle two different error structures. The workaround is relatively easy, I can write my own error enum that wraps both read/write errors, together with the From trait implementations. This way, my code can use the ? operator on both xml::reader and xml::writer code.
Maybe this should be provided out of the box by the xml-rs library? Otherwise everyone who is writing an xml transformation function will have to re-invent it.
This can be useful for code that uses both
xml::reader::Error
andxml::writer::Error
(e.g. a function that processes an input XML file and outputs a different XML file). In that case, the code needs to handle two different error structures. The workaround is relatively easy, I can write my own error enum that wraps both read/write errors, together with theFrom
trait implementations. This way, my code can use the?
operator on bothxml::reader
andxml::writer
code.Maybe this should be provided out of the box by the
xml-rs
library? Otherwise everyone who is writing an xml transformation function will have to re-invent it.The text was updated successfully, but these errors were encountered: