Another batch of removing async_stream (#1970)

This commit is contained in:
Jonathan Turner
2020-06-12 01:34:41 -07:00
committed by GitHub
parent 731aa6bbdd
commit 935a5f6b9e
5 changed files with 217 additions and 204 deletions

View File

@ -339,6 +339,14 @@ impl Value {
}
}
/// View the Value as a Primitive value, if possible
pub fn is_primitive(&self) -> bool {
match &self.value {
UntaggedValue::Primitive(_) => true,
_ => false,
}
}
/// View the Value as unsigned 64-bit, if possible
pub fn as_u64(&self) -> Result<u64, ShellError> {
match &self.value {