diff --git a/Cargo.toml b/Cargo.toml index 8fb07e1..2787b0f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,6 +6,4 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -serde = "0.9.15" -chrono = {version = "0.4.22", features=["serde"]} xml-rs = "0.8.3" \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..b5ee4db --- /dev/null +++ b/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2022 Joey Hines + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..9c7b417 --- /dev/null +++ b/README.md @@ -0,0 +1,6 @@ +# Rust DSN Parser +A Rust library for parsing the status of the NASA Deep Space Network gathered from https://eyes.nasa.gov/dsn/dsn.html. + +This libray only handles parsing the XML response, the user application will need to handle fetching the current +state of the network. + diff --git a/src/lib.rs b/src/lib.rs index de7d407..7bc34d3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -12,7 +12,6 @@ pub enum DsnRespParseError { ParseIntErr(ParseIntError), ParseFloatErr(ParseFloatError), ParseBoolErr(ParseBoolError), - ParseChronoErr(chrono::ParseError), XMLReaderError(xml::reader::Error), } @@ -34,12 +33,6 @@ impl From for DsnRespParseError { } } -impl From for DsnRespParseError { - fn from(error: chrono::ParseError) -> Self { - DsnRespParseError::ParseChronoErr(error) - } -} - impl From for DsnRespParseError { fn from(error: xml::reader::Error) -> Self { DsnRespParseError::XMLReaderError(error) @@ -53,7 +46,6 @@ impl std::fmt::Display for DsnRespParseError { DsnRespParseError::ParseIntErr(e) => write!(f, "Int parse error: {}", e), DsnRespParseError::ParseFloatErr(e) => write!(f, "Int parse error: {}", e), DsnRespParseError::ParseBoolErr(e) => write!(f, "Bool parse error: {}", e), - DsnRespParseError::ParseChronoErr(e) => write!(f, "Chrono parse error: {}", e), DsnRespParseError::XMLReaderError(e) => write!(f, "XML Parse error: {}", e), } }