mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 12:35:59 +02:00
Another batch of removing async_stream (#1970)
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user