pub struct StateValue {
pub rendered: String,
pub type_name: String,
}Expand description
one typed value in a VmState snapshot: its display string and its
runtime type name.
the playground type-tints a stack slot or a variable by type_name (so an
i64 gets one colour, a str another) and shows rendered as the value.
rendered comes from Vm::value_to_string; type_name from
Vm::runtime_type_name.
derives serde::Serialize so Phase 6’s WASM bridge can hand the snapshot
straight to JavaScript – the same precedent diagnostics.rs’s
MonacoDiagnostic set.
Fields§
§rendered: Stringthe value’s display string, e.g. 42, true, [1, 2, 3].
type_name: Stringthe value’s runtime type name, e.g. i64, str, [i64], Shape.
Trait Implementations§
Source§impl Clone for StateValue
impl Clone for StateValue
Source§fn clone(&self) -> StateValue
fn clone(&self) -> StateValue
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StateValue
impl Debug for StateValue
Auto Trait Implementations§
impl Freeze for StateValue
impl RefUnwindSafe for StateValue
impl Send for StateValue
impl Sync for StateValue
impl Unpin for StateValue
impl UnsafeUnpin for StateValue
impl UnwindSafe for StateValue
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