MCPcopy Create free account
hub / github.com/SeaQL/FireDBG.for.Rust / Val

Interface Val

debugger/src/value/base.rs:25–45  ·  view source on GitHub ↗

Represent value using algebra, subject to change: e.g. Enum, Variable { name, type, value }, etc. Should have cases for &str, enum, etc.

Source from the content-addressed store, hash-verified

23/// Represent value using algebra, subject to change: e.g. Enum, Variable { name, type, value }, etc.
24/// Should have cases for &str, enum, etc.
25pub trait Val<A> {
26 type E;
27
28 /// Allocate a memory address. Return true if this address is the first time being allocated.
29 fn alloc_env(&mut self, r: Addr) -> bool;
30 /// Set the Value at this memory address.
31 fn set_env(&mut self, r: Addr, v: Self::E);
32
33 fn prim_v(&self, ty: &str, val: &[u8]) -> Self::E;
34 fn bytes_v(&self, ty: &str, val: Bytes) -> Self::E;
35 fn arr_v<I: Iterator<Item = Self::E>>(&self, iter: I) -> Self::E;
36
37 /// The Addr must have been allocated already.
38 fn ref_v(&self, ty: &str, r: Addr) -> Self::E;
39 fn struct_v<I: Iterator<Item = (String, Self::E)>>(&self, ty: &str, fields: I) -> Self::E;
40 /// C style enum, no field
41 fn enumerate_v(&self, ty: &str, variant: &str) -> Self::E;
42 fn unit_v(&self) -> Self::E;
43 /// what we couldn't inspect
44 fn opaque_v(&self) -> Self::E;
45}
46
47/// Rust extension to `Val`.
48pub trait RVal<A>: Val<A> {

Callers

nothing calls this directly

Implementers 2

reader.rsdebugger/src/reader.rs
value_writer.rsdebugger/src/debugger/value_writer.rs

Calls

no outgoing calls

Tested by

no test coverage detected