pub struct RenderedVariable {
pub name: String,
pub value: String,
pub type_name: Option<String>,
pub variables_reference: i64,
pub named_variables: Option<i64>,
pub indexed_variables: Option<i64>,
pub presentation_hint: Option<VariablePresentationHint>,
pub memory_reference: Option<String>,
}Expand description
A rendered variable for the DAP protocol.
This struct represents a variable in a format suitable for the Debug Adapter Protocol, supporting lazy expansion of complex data structures.
Fields§
§name: StringThe name of the variable (e.g., “$foo”, “@bar”, “%hash”)
value: StringThe string representation of the value
type_name: Option<String>The type of the variable (e.g., “SCALAR”, “ARRAY”, “HASH”)
variables_reference: i64Reference ID for lazy expansion (0 = not expandable)
named_variables: Option<i64>Number of named children (for objects/hashes)
indexed_variables: Option<i64>Number of indexed children (for arrays)
presentation_hint: Option<VariablePresentationHint>Presentation hint for the UI
memory_reference: Option<String>Memory address (if available)
Implementations§
Source§impl RenderedVariable
impl RenderedVariable
Sourcepub fn new(name: impl Into<String>, value: impl Into<String>) -> Self
pub fn new(name: impl Into<String>, value: impl Into<String>) -> Self
Creates a new rendered variable with the given name and value.
Sourcepub fn with_type(self, type_name: impl Into<String>) -> Self
pub fn with_type(self, type_name: impl Into<String>) -> Self
Sets the type name for this variable.
Sourcepub fn with_reference(self, reference: i64) -> Self
pub fn with_reference(self, reference: i64) -> Self
Sets the variables reference for lazy expansion.
Sourcepub fn with_indexed_variables(self, count: i64) -> Self
pub fn with_indexed_variables(self, count: i64) -> Self
Sets the indexed variables count (for arrays).
Sourcepub fn with_named_variables(self, count: i64) -> Self
pub fn with_named_variables(self, count: i64) -> Self
Sets the named variables count (for hashes/objects).
Sourcepub fn is_expandable(&self) -> bool
pub fn is_expandable(&self) -> bool
Returns true if this variable can be expanded.
Trait Implementations§
Source§impl Clone for RenderedVariable
impl Clone for RenderedVariable
Source§fn clone(&self) -> RenderedVariable
fn clone(&self) -> RenderedVariable
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more