1 2 3 4 5 6 7 8 9 10 11
use quire::validate::{Structure, Numeric}; #[derive(RustcDecodable, Debug, PartialEq, Eq, Hash)] pub struct Disk { pub num_threads: usize, } pub fn validator<'x>() -> Structure<'x> { Structure::new() .member("num_threads", Numeric::new().min(1)) }