1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
//! Arch Linux repository package definitions parser //! //! # Example //! ```ignore //! #[allow(clippy::needless_doctest_main)] //! struct Test { //! #[serde(rename = "TEST")] //! test: String //! } //! //! fn main() { //! let test = Test {test: "test".to_owned() }; //! let string = archlinux_repo_parser::to_string(&test).unwrap(); //! let decoded: Test = archlinux_repo_parser::from_str(&string).unwrap(); //! } //! ``` //! //! ## Example of package definition file //! ```ignore //! %FILENAME% //! mingw-w64-x86_64-ag-2.2.0-1-any.pkg.tar.xz //! //! %NAME% //! mingw-w64-x86_64-ag //! //! %BASE% //! mingw-w64-ag //! //! %VERSION% //! 2.2.0-1 //! //! %DESC% //! The Silver Searcher: An attempt to make something better than ack, which itself is better than grep (mingw-w64) //! //! %CSIZE% //! 79428 //! //! %ISIZE% //! 145408 //! //! %MD5SUM% //! 3368b34f1506e7fd84185901dfd5ac2f //! //! %SHA256SUM% //! c2b39a45ddd3983f3f4d7f6df34935999454a4bff345d88c8c6e66c81a2f6d7e //! //! %PGPSIG% //! iHUEABEIAB0WIQStNRxQrghXdetZMztfku/BpH1FoQUCXQOnfgAKCRBfku/BpH1FoZzhAQCEjnsM18ZCqJHhEE0BwXVsH9ONj87w0Wt8W77ZElUcKwD/RcnlD4Ef7gmOdl+puSDMUNylHQ2wlOdumaVSkQlOhLw= //! //! %URL% //! https://geoff.greer.fm/ag //! //! %LICENSE% //! Apache //! //! %ARCH% //! any //! //! %BUILDDATE% //! 1560520506 //! //! %PACKAGER% //! Alexey Pavlov <alexpux@gmail.com> //! //! %DEPENDS% //! mingw-w64-x86_64-pcre //! mingw-w64-x86_64-xz //! mingw-w64-x86_64-zlib //! //! %MAKEDEPENDS% //! mingw-w64-x86_64-gcc //! mingw-w64-x86_64-pkg-config //! ``` mod de; mod error; mod ser; pub use de::{from_str, Deserializer}; pub use error::{Error, Result}; pub use ser::{to_string, Serializer};