giga-chess-api-types 0.1.0

A library providing shared types between giga-chess client and server.
Documentation
1
2
3
4
5
6
7
8
9
#[cfg(feature = "uuid")]
#[cfg(feature = "validator")]
pub fn is_uuid(value: &str) -> Result<(), validator::ValidationError> {
    if uuid::Uuid::parse_str(value).is_ok() {
        Ok(())
    } else {
        Err(validator::ValidationError::new("must be a valid UUID"))
    }
}