4 releases
Uses old Rust 2015
0.1.3 | Aug 7, 2016 |
---|---|
0.1.2 | Aug 7, 2016 |
0.1.1 | Aug 7, 2016 |
0.1.0 | Aug 7, 2016 |
#505 in #documentation
210KB
309 lines
xcur-rs
Parser for XCursor files in Rust.
Usage
Add this to your Cargo.toml
:
[dependencies]
xcur = "0.1.*"
And this to your crate root:
extern crate xcur;
Example
extern crate xcur;
extern crate nom;
use xcur::parser::File as XCursorFile;
use nom::IResult;
fn main() {
let data = include_bytes!("./assets/xterm");
let xcursor_file = match XCursorFile::parse(data) {
IResult::Done(_i, file) => file,
IResult::Incomplete(e) => panic!("Incomplete, needed: {}", e),
IResult::Error(e) => panic!("Error: {}", e),
};
}
License
xcur-rs - Parser for XCursor files in Rust
Copyright (C) 2016 Jean Pierre Dudey
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Dependencies
~0.7–1.3MB
~31K SLoC