Removed unused deps and added README and LICENSE
parent
2dca331092
commit
d3ed1130fd
|
@ -6,6 +6,4 @@ edition = "2021"
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
serde = "0.9.15"
|
|
||||||
chrono = {version = "0.4.22", features=["serde"]}
|
|
||||||
xml-rs = "0.8.3"
|
xml-rs = "0.8.3"
|
|
@ -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.
|
|
@ -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.
|
||||||
|
|
|
@ -12,7 +12,6 @@ pub enum DsnRespParseError {
|
||||||
ParseIntErr(ParseIntError),
|
ParseIntErr(ParseIntError),
|
||||||
ParseFloatErr(ParseFloatError),
|
ParseFloatErr(ParseFloatError),
|
||||||
ParseBoolErr(ParseBoolError),
|
ParseBoolErr(ParseBoolError),
|
||||||
ParseChronoErr(chrono::ParseError),
|
|
||||||
XMLReaderError(xml::reader::Error),
|
XMLReaderError(xml::reader::Error),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,12 +33,6 @@ impl From<ParseBoolError> for DsnRespParseError {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<chrono::ParseError> for DsnRespParseError {
|
|
||||||
fn from(error: chrono::ParseError) -> Self {
|
|
||||||
DsnRespParseError::ParseChronoErr(error)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl From<xml::reader::Error> for DsnRespParseError {
|
impl From<xml::reader::Error> for DsnRespParseError {
|
||||||
fn from(error: xml::reader::Error) -> Self {
|
fn from(error: xml::reader::Error) -> Self {
|
||||||
DsnRespParseError::XMLReaderError(error)
|
DsnRespParseError::XMLReaderError(error)
|
||||||
|
@ -53,7 +46,6 @@ impl std::fmt::Display for DsnRespParseError {
|
||||||
DsnRespParseError::ParseIntErr(e) => write!(f, "Int parse error: {}", e),
|
DsnRespParseError::ParseIntErr(e) => write!(f, "Int parse error: {}", e),
|
||||||
DsnRespParseError::ParseFloatErr(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::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),
|
DsnRespParseError::XMLReaderError(e) => write!(f, "XML Parse error: {}", e),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue