pub enum ValueView {
Show 23 variants
Nil,
Bool(bool),
Int(i64),
Float(f64),
String(Rc<String>),
Symbol(Spur),
Keyword(Spur),
Char(char),
List(Rc<Vec<Value>>),
Vector(Rc<Vec<Value>>),
Map(Rc<BTreeMap<Value, Value>>),
HashMap(Rc<HashMap<Value, Value>>),
Lambda(Rc<Lambda>),
Macro(Rc<Macro>),
NativeFn(Rc<NativeFn>),
Prompt(Rc<Prompt>),
Message(Rc<Message>),
Conversation(Rc<Conversation>),
ToolDef(Rc<ToolDefinition>),
Agent(Rc<Agent>),
Thunk(Rc<Thunk>),
Record(Rc<Record>),
Bytevector(Rc<Vec<u8>>),
}Expand description
A view of a NaN-boxed Value for pattern matching.
Returned by Value::view(). Heap types hold Rc (refcount bumped).
Variants§
Nil
Bool(bool)
Int(i64)
Float(f64)
String(Rc<String>)
Symbol(Spur)
Keyword(Spur)
Char(char)
List(Rc<Vec<Value>>)
Vector(Rc<Vec<Value>>)
Map(Rc<BTreeMap<Value, Value>>)
HashMap(Rc<HashMap<Value, Value>>)
Lambda(Rc<Lambda>)
Macro(Rc<Macro>)
NativeFn(Rc<NativeFn>)
Prompt(Rc<Prompt>)
Message(Rc<Message>)
Conversation(Rc<Conversation>)
ToolDef(Rc<ToolDefinition>)
Agent(Rc<Agent>)
Thunk(Rc<Thunk>)
Record(Rc<Record>)
Bytevector(Rc<Vec<u8>>)
Auto Trait Implementations§
impl Freeze for ValueView
impl !RefUnwindSafe for ValueView
impl !Send for ValueView
impl !Sync for ValueView
impl Unpin for ValueView
impl UnsafeUnpin for ValueView
impl !UnwindSafe for ValueView
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
Mutably borrows from an owned value. Read more