pub enum Value {
Show 52 variants
Number(i64),
Float(f64),
BigInteger(BigInt),
Character(char),
Regex(String),
Tagged(Box<TaggedLiteral<Value>>),
Bool(bool),
String(String),
Keyword(Keyword),
Bytes(Vec<u8>),
ByteBuffer(Rc<RefCell<Vec<u8>>>),
Array(Rc<RefCell<Vec<Value>>>),
Object(Rc<RefCell<Vec<(String, Value)>>>),
Promise(Promise),
Atom(Box<RuntimeAtom>),
Recur(Vec<Value>),
Map(Map<Value, Value>),
OrderedMap(Box<OrderedMap<Value, Value>>),
SortedMap(Box<SortedMap<Value, Value>>),
Trie(Box<Trie<Value>>),
Set(Set<Value>),
OrderedSet(Box<OrderedSet<Value>>),
SortedSet(Box<SortedSet<Value>>),
List(List<Value>),
Cons(Box<Cons<Value>>),
Deque(Box<Deque<Value>>),
Queue(Box<Queue<Value>>),
PriorityMap(Box<PriorityMap<Value, Value>>),
Symbol(Symbol),
Pointer(Pointer),
Function(Rc<Function>),
Tuple(Box<Tuple<Value>>),
Vector(Vector<Value>),
MapEntry(Box<MapEntry>),
MutableCollection(Rc<RefCell<Option<MutableCollection>>>),
Seq(Box<Seq<Result<Value, String>>>),
Iterator(Rc<RefCell<IteratorState>>),
Var(Var<Value>),
Namespace(Rc<Namespace<Value>>),
Extension(ExtensionValue),
StructType(Rc<StructType>),
Struct(Rc<StructValue>),
MutableType(Rc<MutableType>),
Mutable(Rc<MutableValue>),
Protocol(Rc<GuestProtocol>),
NativeType(Rc<NativeType>),
Schema(Rc<RuntimeSchema>),
Coroutine(Rc<Coroutine>),
Stream(Rc<RuntimeStream>),
Result(Rc<ResultValue>),
ExceptionInfo(Rc<ExceptionInfo>),
Nil,
}Variants§
Number(i64)
Float(f64)
BigInteger(BigInt)
Character(char)
Regex(String)
Tagged(Box<TaggedLiteral<Value>>)
Bool(bool)
String(String)
Keyword(Keyword)
Bytes(Vec<u8>)
ByteBuffer(Rc<RefCell<Vec<u8>>>)
Array(Rc<RefCell<Vec<Value>>>)
Object(Rc<RefCell<Vec<(String, Value)>>>)
Promise(Promise)
Atom(Box<RuntimeAtom>)
Recur(Vec<Value>)
Map(Map<Value, Value>)
OrderedMap(Box<OrderedMap<Value, Value>>)
SortedMap(Box<SortedMap<Value, Value>>)
Trie(Box<Trie<Value>>)
Set(Set<Value>)
OrderedSet(Box<OrderedSet<Value>>)
SortedSet(Box<SortedSet<Value>>)
List(List<Value>)
Cons(Box<Cons<Value>>)
Deque(Box<Deque<Value>>)
Queue(Box<Queue<Value>>)
PriorityMap(Box<PriorityMap<Value, Value>>)
Symbol(Symbol)
Pointer(Pointer)
Function(Rc<Function>)
Tuple(Box<Tuple<Value>>)
Vector(Vector<Value>)
MapEntry(Box<MapEntry>)
MutableCollection(Rc<RefCell<Option<MutableCollection>>>)
Seq(Box<Seq<Result<Value, String>>>)
Iterator(Rc<RefCell<IteratorState>>)
Var(Var<Value>)
Namespace(Rc<Namespace<Value>>)
Extension(ExtensionValue)
StructType(Rc<StructType>)
Struct(Rc<StructValue>)
MutableType(Rc<MutableType>)
Mutable(Rc<MutableValue>)
Protocol(Rc<GuestProtocol>)
NativeType(Rc<NativeType>)
Schema(Rc<RuntimeSchema>)
Coroutine(Rc<Coroutine>)
Stream(Rc<RuntimeStream>)
Result(Rc<ResultValue>)
ExceptionInfo(Rc<ExceptionInfo>)
Nil
Implementations§
Source§impl Value
impl Value
pub fn display(&self) -> String
Sourcepub fn stable_hash(&self) -> u64
pub fn stable_hash(&self) -> u64
Stable structural hash used by protocol and collection conformance tests.
This is the Java-parity RAPID hash: the bit pattern (as u64) of the
Java long produced by G.hashRapid / hashCalc(RAPID) on the
equivalent Java value. Value-level hashes are Java int results
sign-extended to 64 bits, matching G.hashValue returning long.
Opaque runtime objects (functions, atoms, promises, …) keep the
previous identity-based DefaultHasher scheme — their Java
counterparts hash by object identity, so no parity exists there.
Trait Implementations§
impl Eq for Value
Source§impl JavaHash for Value
impl JavaHash for Value
Source§fn java_hash(&self, hash_type: HashType) -> i64
fn java_hash(&self, hash_type: HashType) -> i64
The Java long hash of this value under hash_type, mirroring
G.hashFn(t).apply(o). See the lang::hash module docs for the
parity rules and the documented deviations where Java hashes by
object identity (keywords, pointers, SYSTEM/SIP collection hashes).
Source§impl Ord for Value
impl Ord for Value
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Auto Trait Implementations§
impl !RefUnwindSafe for Value
impl !Send for Value
impl !Sync for Value
impl !UnwindSafe for Value
impl Freeze for Value
impl Unpin for Value
impl UnsafeUnpin for Value
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more