mirror of
https://github.com/edg-l/teeconfig.git
synced 2024-11-09 09:38:25 +00:00
pub vis
This commit is contained in:
parent
f1674bdd97
commit
bf1d464934
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "teeconfig"
|
name = "teeconfig"
|
||||||
version = "0.1.0-alpha.1"
|
version = "0.1.0-alpha.2"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
authors = ["Edgar <git@edgarluque.com>"]
|
authors = ["Edgar <git@edgarluque.com>"]
|
||||||
description = "A teeworlds/ddnet config parser."
|
description = "A teeworlds/ddnet config parser."
|
||||||
|
|
13
src/lib.rs
13
src/lib.rs
|
@ -10,9 +10,10 @@ mod tokens_cfg;
|
||||||
mod tokens_cpp;
|
mod tokens_cpp;
|
||||||
|
|
||||||
bitflags! {
|
bitflags! {
|
||||||
|
/// Config option flags.
|
||||||
#[rustfmt::skip]
|
#[rustfmt::skip]
|
||||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
|
||||||
struct CFGFlags: u16 {
|
pub struct CFGFlags: u16 {
|
||||||
const SAVE = 1 << 0;
|
const SAVE = 1 << 0;
|
||||||
const CLIENT = 1 << 1;
|
const CLIENT = 1 << 1;
|
||||||
const SERVER = 1 << 2;
|
const SERVER = 1 << 2;
|
||||||
|
@ -28,15 +29,15 @@ bitflags! {
|
||||||
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||||
pub struct ConfigEntry {
|
pub struct ConfigEntry {
|
||||||
/// The description of this config entry.
|
/// The description of this config entry.
|
||||||
description: String,
|
pub description: String,
|
||||||
/// The type of the entry.
|
/// The type of the entry.
|
||||||
entry_type: EntryType,
|
pub entry_type: EntryType,
|
||||||
/// The flags of the entry.
|
/// The flags of the entry.
|
||||||
flags: CFGFlags,
|
pub flags: CFGFlags,
|
||||||
/// The name of the entry, used in the config file.
|
/// The name of the entry, used in the config file.
|
||||||
name: String,
|
pub name: String,
|
||||||
/// The symbol of the entry as used in the source code.
|
/// The symbol of the entry as used in the source code.
|
||||||
symbol: String,
|
pub symbol: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||||
|
|
Loading…
Reference in a new issue