add support for Uuid

This commit is contained in:
Simon Bernier St-Pierre
2019-04-08 14:19:42 -04:00
parent 22614c64bd
commit c42175a424
7 changed files with 78 additions and 3 deletions

View File

@@ -48,6 +48,13 @@ impl From<i128> for Value {
}
}
#[cfg(feature = "uuid")]
impl From<uuid::Uuid> for Value {
fn from(id: uuid::Uuid) -> Value {
Value::Blob(id.as_bytes().to_vec())
}
}
macro_rules! from_i64(
($t:ty) => (
impl From<$t> for Value {