underworld_core 0.6.3

Small library to either play a game or assist in generating rooms
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use std::str::FromStr;

use uuid::Uuid;

use crate::errors::Error;

pub fn parse_id(id: &str) -> Result<Uuid, Error> {
    match Uuid::from_str(id) {
        Ok(it) => Ok(it),
        Err(_) => Err(Error::InvalidIdError(id.to_string())),
    }
}