Add kind to Value

This commit is contained in:
Ivan Ukhov 2015-08-04 08:28:00 -04:00
parent f2e6ac7e03
commit d88c091c50

View File

@ -233,6 +233,17 @@ impl Value {
}
None
}
/// Return the type.
pub fn kind(&self) -> Type {
match self {
&Value::Binary(_) => Type::Binary,
&Value::Float(_) => Type::Float,
&Value::Integer(_) => Type::Integer,
&Value::String(_) => Type::String,
&Value::Null => Type::Null,
}
}
}
mod connection;