Add initial module structure

This commit is contained in:
Matthias Beyer 2016-02-04 14:01:33 +01:00
parent 38c492c362
commit fd204ee05e
8 changed files with 16 additions and 0 deletions

0
libimagtag/src/add.rs Normal file
View file

0
libimagtag/src/check.rs Normal file
View file

0
libimagtag/src/error.rs Normal file
View file

View file

@ -1,2 +1,12 @@
extern crate regex; extern crate regex;
extern crate toml; extern crate toml;
extern crate libimagstore;
pub mod add;
pub mod check;
pub mod error;
pub mod remove;
pub mod result;
pub mod tag;
pub mod util;

0
libimagtag/src/remove.rs Normal file
View file

0
libimagtag/src/result.rs Normal file
View file

1
libimagtag/src/tag.rs Normal file
View file

@ -0,0 +1 @@
pub type Tag = String;

5
libimagtag/src/util.rs Normal file
View file

@ -0,0 +1,5 @@
use regex::Regex;
pub fn is_tag(s: &String) -> bool {
Regex::new("^[a-zA-Z]([a-zA-Z0-9_-]*)$").unwrap().captures(&s[..]).is_some()
}