4 个版本

使用旧的 Rust 2015

0.1.3 2016 年 8 月 7 日
0.1.2 2016 年 8 月 7 日
0.1.1 2016 年 8 月 7 日
0.1.0 2016 年 8 月 7 日

#470 in #documentation

GPL-3.0 许可证

210KB
309 代码行数(不包括注释)


文档

xcur-rs

Rust 中 XCursor 文件的解析器。

用法

将以下内容添加到您的 Cargo.toml

[dependencies]
xcur = "0.1.*"

并将以下内容添加到您的 crate 根目录

extern crate xcur;

示例

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),
    };
}

许可证

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/>.

依赖项

~0.7–1.3MB
~31K SLoC