#![warn(
// ---------- Stylistic
future_incompatible,
nonstandard_style,
rust_2018_idioms,
trivial_casts,
trivial_numeric_casts,
// ---------- Public
missing_debug_implementations,
missing_docs,
unreachable_pub,
// ---------- Unsafe
unsafe_code,
// ---------- Unused
unused_extern_crates,
unused_import_braces,
unused_qualifications,
unused_results,
)]
use std::str::FromStr;
pub trait Generator<T>: Default
where
T: PartialEq,
{
fn next_id(&self) -> T;
}
pub trait GeneratorWithInvalid<T>: Generator<T>
where
T: PartialEq,
{
fn invalid_id() -> T
where
Self: Sized;
}
pub trait GeneratorFromStr<T>: Generator<T>
where
T: PartialEq + FromStr,
{
fn is_valid_value(s: &str) -> bool;
}
pub trait GeneratorFromSeed<T>: Generator<T>
where
T: PartialEq,
{
fn new(seed: T) -> Self;
}
#[cfg(feature = "random")]
pub mod random;
#[cfg(feature = "sequence")]
pub mod sequence;
#[cfg(feature = "string")]
pub mod string;