forked from Mirrors/helix
Refactor types, add a Request trait
parent
2d1ae2e44b
commit
3a9e1c305b
@ -1,324 +1,392 @@
|
|||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use serde_json::Value;
|
use serde_json::Value;
|
||||||
|
|
||||||
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
pub trait Request {
|
||||||
#[serde(rename_all = "camelCase")]
|
type Arguments: serde::de::DeserializeOwned + serde::Serialize;
|
||||||
pub struct ColumnDescriptor {
|
type Result: serde::de::DeserializeOwned + serde::Serialize;
|
||||||
pub attribute_name: String,
|
const COMMAND: &'static str;
|
||||||
pub label: String,
|
}
|
||||||
pub format: Option<String>,
|
|
||||||
#[serde(rename = "type")]
|
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
||||||
pub col_type: Option<String>,
|
#[serde(rename_all = "camelCase")]
|
||||||
pub width: Option<usize>,
|
pub struct ColumnDescriptor {
|
||||||
}
|
pub attribute_name: String,
|
||||||
|
pub label: String,
|
||||||
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
pub format: Option<String>,
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename = "type")]
|
||||||
pub struct ExceptionBreakpointsFilter {
|
pub col_type: Option<String>,
|
||||||
pub filter: String,
|
pub width: Option<usize>,
|
||||||
pub label: String,
|
}
|
||||||
pub description: Option<String>,
|
|
||||||
pub default: Option<bool>,
|
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
||||||
pub supports_condition: Option<bool>,
|
#[serde(rename_all = "camelCase")]
|
||||||
pub condition_description: Option<String>,
|
pub struct ExceptionBreakpointsFilter {
|
||||||
}
|
pub filter: String,
|
||||||
|
pub label: String,
|
||||||
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
pub description: Option<String>,
|
||||||
#[serde(rename_all = "camelCase")]
|
pub default: Option<bool>,
|
||||||
pub struct DebuggerCapabilities {
|
pub supports_condition: Option<bool>,
|
||||||
pub supports_configuration_done_request: Option<bool>,
|
pub condition_description: Option<String>,
|
||||||
pub supports_function_breakpoints: Option<bool>,
|
}
|
||||||
pub supports_conditional_breakpoints: Option<bool>,
|
|
||||||
pub supports_hit_conditional_breakpoints: Option<bool>,
|
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
||||||
pub supports_evaluate_for_hovers: Option<bool>,
|
#[serde(rename_all = "camelCase")]
|
||||||
pub supports_step_back: Option<bool>,
|
pub struct DebuggerCapabilities {
|
||||||
pub supports_set_variable: Option<bool>,
|
pub supports_configuration_done_request: Option<bool>,
|
||||||
pub supports_restart_frame: Option<bool>,
|
pub supports_function_breakpoints: Option<bool>,
|
||||||
pub supports_goto_targets_request: Option<bool>,
|
pub supports_conditional_breakpoints: Option<bool>,
|
||||||
pub supports_step_in_targets_request: Option<bool>,
|
pub supports_hit_conditional_breakpoints: Option<bool>,
|
||||||
pub supports_completions_request: Option<bool>,
|
pub supports_evaluate_for_hovers: Option<bool>,
|
||||||
pub supports_modules_request: Option<bool>,
|
pub supports_step_back: Option<bool>,
|
||||||
pub supports_restart_request: Option<bool>,
|
pub supports_set_variable: Option<bool>,
|
||||||
pub supports_exception_options: Option<bool>,
|
pub supports_restart_frame: Option<bool>,
|
||||||
pub supports_value_formatting_options: Option<bool>,
|
pub supports_goto_targets_request: Option<bool>,
|
||||||
pub supports_exception_info_request: Option<bool>,
|
pub supports_step_in_targets_request: Option<bool>,
|
||||||
pub support_terminate_debuggee: Option<bool>,
|
pub supports_completions_request: Option<bool>,
|
||||||
pub support_suspend_debuggee: Option<bool>,
|
pub supports_modules_request: Option<bool>,
|
||||||
pub supports_delayed_stack_trace_loading: Option<bool>,
|
pub supports_restart_request: Option<bool>,
|
||||||
pub supports_loaded_sources_request: Option<bool>,
|
pub supports_exception_options: Option<bool>,
|
||||||
pub supports_log_points: Option<bool>,
|
pub supports_value_formatting_options: Option<bool>,
|
||||||
pub supports_terminate_threads_request: Option<bool>,
|
pub supports_exception_info_request: Option<bool>,
|
||||||
pub supports_set_expression: Option<bool>,
|
pub support_terminate_debuggee: Option<bool>,
|
||||||
pub supports_terminate_request: Option<bool>,
|
pub support_suspend_debuggee: Option<bool>,
|
||||||
pub supports_data_breakpoints: Option<bool>,
|
pub supports_delayed_stack_trace_loading: Option<bool>,
|
||||||
pub supports_read_memory_request: Option<bool>,
|
pub supports_loaded_sources_request: Option<bool>,
|
||||||
pub supports_write_memory_request: Option<bool>,
|
pub supports_log_points: Option<bool>,
|
||||||
pub supports_disassemble_request: Option<bool>,
|
pub supports_terminate_threads_request: Option<bool>,
|
||||||
pub supports_cancel_request: Option<bool>,
|
pub supports_set_expression: Option<bool>,
|
||||||
pub supports_breakpoint_locations_request: Option<bool>,
|
pub supports_terminate_request: Option<bool>,
|
||||||
pub supports_clipboard_context: Option<bool>,
|
pub supports_data_breakpoints: Option<bool>,
|
||||||
pub supports_stepping_granularity: Option<bool>,
|
pub supports_read_memory_request: Option<bool>,
|
||||||
pub supports_instruction_breakpoints: Option<bool>,
|
pub supports_write_memory_request: Option<bool>,
|
||||||
pub supports_exception_filter_options: Option<bool>,
|
pub supports_disassemble_request: Option<bool>,
|
||||||
pub exception_breakpoint_filters: Option<Vec<ExceptionBreakpointsFilter>>,
|
pub supports_cancel_request: Option<bool>,
|
||||||
pub completion_trigger_characters: Option<Vec<String>>,
|
pub supports_breakpoint_locations_request: Option<bool>,
|
||||||
pub additional_module_columns: Option<Vec<ColumnDescriptor>>,
|
pub supports_clipboard_context: Option<bool>,
|
||||||
pub supported_checksum_algorithms: Option<Vec<String>>,
|
pub supports_stepping_granularity: Option<bool>,
|
||||||
}
|
pub supports_instruction_breakpoints: Option<bool>,
|
||||||
|
pub supports_exception_filter_options: Option<bool>,
|
||||||
impl std::ops::Deref for DebuggerCapabilities {
|
pub exception_breakpoint_filters: Option<Vec<ExceptionBreakpointsFilter>>,
|
||||||
type Target = Option<bool>;
|
pub completion_trigger_characters: Option<Vec<String>>,
|
||||||
|
pub additional_module_columns: Option<Vec<ColumnDescriptor>>,
|
||||||
fn deref(&self) -> &Self::Target {
|
pub supported_checksum_algorithms: Option<Vec<String>>,
|
||||||
&self.supports_exception_options
|
}
|
||||||
}
|
|
||||||
}
|
impl std::ops::Deref for DebuggerCapabilities {
|
||||||
|
type Target = Option<bool>;
|
||||||
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
|
||||||
#[serde(rename_all = "camelCase")]
|
fn deref(&self) -> &Self::Target {
|
||||||
pub struct InitializeArguments {
|
&self.supports_exception_options
|
||||||
#[serde(rename = "clientID")]
|
}
|
||||||
pub client_id: Option<String>,
|
}
|
||||||
pub client_name: Option<String>,
|
|
||||||
#[serde(rename = "adapterID")]
|
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
||||||
pub adapter_id: String,
|
#[serde(rename_all = "camelCase")]
|
||||||
pub locale: Option<String>,
|
pub struct Checksum {
|
||||||
#[serde(rename = "linesStartAt1")]
|
pub algorithm: String,
|
||||||
pub lines_start_at_one: Option<bool>,
|
pub checksum: String,
|
||||||
#[serde(rename = "columnsStartAt1")]
|
}
|
||||||
pub columns_start_at_one: Option<bool>,
|
|
||||||
pub path_format: Option<String>,
|
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
||||||
pub supports_variable_type: Option<bool>,
|
#[serde(rename_all = "camelCase")]
|
||||||
pub supports_variable_paging: Option<bool>,
|
pub struct Source {
|
||||||
pub supports_run_in_terminal_request: Option<bool>,
|
pub name: Option<String>,
|
||||||
pub supports_memory_references: Option<bool>,
|
pub path: Option<String>,
|
||||||
pub supports_progress_reporting: Option<bool>,
|
pub source_reference: Option<usize>,
|
||||||
pub supports_invalidated_event: Option<bool>,
|
pub presentation_hint: Option<String>,
|
||||||
}
|
pub origin: Option<String>,
|
||||||
|
pub sources: Option<Vec<Source>>,
|
||||||
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
pub adapter_data: Option<Value>,
|
||||||
#[serde(rename_all = "camelCase")]
|
pub checksums: Option<Vec<Checksum>>,
|
||||||
pub struct Checksum {
|
}
|
||||||
pub algorithm: String,
|
|
||||||
pub checksum: String,
|
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
||||||
}
|
#[serde(rename_all = "camelCase")]
|
||||||
|
pub struct SourceBreakpoint {
|
||||||
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
pub line: usize,
|
||||||
#[serde(rename_all = "camelCase")]
|
pub column: Option<usize>,
|
||||||
pub struct Source {
|
pub condition: Option<String>,
|
||||||
pub name: Option<String>,
|
pub hit_condition: Option<String>,
|
||||||
pub path: Option<String>,
|
pub log_message: Option<String>,
|
||||||
pub source_reference: Option<usize>,
|
}
|
||||||
pub presentation_hint: Option<String>,
|
|
||||||
pub origin: Option<String>,
|
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
||||||
pub sources: Option<Vec<Source>>,
|
#[serde(rename_all = "camelCase")]
|
||||||
pub adapter_data: Option<Value>,
|
pub struct Breakpoint {
|
||||||
pub checksums: Option<Vec<Checksum>>,
|
pub id: Option<usize>,
|
||||||
}
|
pub verified: bool,
|
||||||
|
pub message: Option<String>,
|
||||||
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
pub source: Option<Source>,
|
||||||
#[serde(rename_all = "camelCase")]
|
pub line: Option<usize>,
|
||||||
pub struct SourceBreakpoint {
|
pub column: Option<usize>,
|
||||||
pub line: usize,
|
pub end_line: Option<usize>,
|
||||||
pub column: Option<usize>,
|
pub end_column: Option<usize>,
|
||||||
pub condition: Option<String>,
|
pub instruction_reference: Option<String>,
|
||||||
pub hit_condition: Option<String>,
|
pub offset: Option<usize>,
|
||||||
pub log_message: Option<String>,
|
}
|
||||||
}
|
|
||||||
|
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
||||||
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
#[serde(rename_all = "camelCase")]
|
||||||
#[serde(rename_all = "camelCase")]
|
pub struct StackFrameFormat {
|
||||||
pub struct SetBreakpointsArguments {
|
pub parameters: Option<bool>,
|
||||||
pub source: Source,
|
pub parameter_types: Option<bool>,
|
||||||
pub breakpoints: Option<Vec<SourceBreakpoint>>,
|
pub parameter_names: Option<bool>,
|
||||||
// lines is deprecated
|
pub parameter_values: Option<bool>,
|
||||||
pub source_modified: Option<bool>,
|
pub line: Option<bool>,
|
||||||
}
|
pub module: Option<bool>,
|
||||||
|
pub include_all: Option<bool>,
|
||||||
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
}
|
||||||
#[serde(rename_all = "camelCase")]
|
|
||||||
pub struct Breakpoint {
|
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
||||||
pub id: Option<usize>,
|
#[serde(rename_all = "camelCase")]
|
||||||
pub verified: bool,
|
pub struct StackFrame {
|
||||||
pub message: Option<String>,
|
pub id: usize,
|
||||||
pub source: Option<Source>,
|
pub name: String,
|
||||||
pub line: Option<usize>,
|
pub source: Option<Source>,
|
||||||
pub column: Option<usize>,
|
pub line: usize,
|
||||||
pub end_line: Option<usize>,
|
pub column: usize,
|
||||||
pub end_column: Option<usize>,
|
pub end_line: Option<usize>,
|
||||||
pub instruction_reference: Option<String>,
|
pub end_column: Option<usize>,
|
||||||
pub offset: Option<usize>,
|
pub can_restart: Option<bool>,
|
||||||
}
|
pub instruction_pointer_reference: Option<String>,
|
||||||
|
pub module_id: Option<Value>,
|
||||||
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
pub presentation_hint: Option<String>,
|
||||||
#[serde(rename_all = "camelCase")]
|
}
|
||||||
pub struct SetBreakpointsResponseBody {
|
|
||||||
pub breakpoints: Option<Vec<Breakpoint>>,
|
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
||||||
}
|
#[serde(rename_all = "camelCase")]
|
||||||
|
pub struct Thread {
|
||||||
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
pub id: usize,
|
||||||
#[serde(rename_all = "camelCase")]
|
pub name: String,
|
||||||
pub struct ContinueArguments {
|
}
|
||||||
pub thread_id: usize,
|
|
||||||
}
|
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
||||||
|
#[serde(rename_all = "camelCase")]
|
||||||
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
pub struct Scope {
|
||||||
#[serde(rename_all = "camelCase")]
|
pub name: String,
|
||||||
pub struct ContinueResponseBody {
|
pub presentation_hint: Option<String>,
|
||||||
pub all_threads_continued: Option<bool>,
|
pub variables_reference: usize,
|
||||||
}
|
pub named_variables: Option<usize>,
|
||||||
|
pub indexed_variables: Option<usize>,
|
||||||
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
pub expensive: bool,
|
||||||
#[serde(rename_all = "camelCase")]
|
pub source: Option<Source>,
|
||||||
pub struct StackFrameFormat {
|
pub line: Option<usize>,
|
||||||
pub parameters: Option<bool>,
|
pub column: Option<usize>,
|
||||||
pub parameter_types: Option<bool>,
|
pub end_line: Option<usize>,
|
||||||
pub parameter_names: Option<bool>,
|
pub end_column: Option<usize>,
|
||||||
pub parameter_values: Option<bool>,
|
}
|
||||||
pub line: Option<bool>,
|
|
||||||
pub module: Option<bool>,
|
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
||||||
pub include_all: Option<bool>,
|
#[serde(rename_all = "camelCase")]
|
||||||
}
|
pub struct ValueFormat {
|
||||||
|
pub hex: Option<bool>,
|
||||||
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
}
|
||||||
#[serde(rename_all = "camelCase")]
|
|
||||||
pub struct StackTraceArguments {
|
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
||||||
pub thread_id: usize,
|
#[serde(rename_all = "camelCase")]
|
||||||
pub start_frame: Option<usize>,
|
pub struct VariablePresentationHint {
|
||||||
pub levels: Option<usize>,
|
pub kind: Option<String>,
|
||||||
pub format: Option<StackFrameFormat>,
|
pub attributes: Option<Vec<String>>,
|
||||||
}
|
pub visibility: Option<String>,
|
||||||
|
}
|
||||||
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
|
||||||
#[serde(rename_all = "camelCase")]
|
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
||||||
pub struct StackFrame {
|
#[serde(rename_all = "camelCase")]
|
||||||
pub id: usize,
|
pub struct Variable {
|
||||||
pub name: String,
|
pub name: String,
|
||||||
pub source: Option<Source>,
|
pub value: String,
|
||||||
pub line: usize,
|
#[serde(rename = "type")]
|
||||||
pub column: usize,
|
pub data_type: Option<String>,
|
||||||
pub end_line: Option<usize>,
|
pub presentation_hint: Option<VariablePresentationHint>,
|
||||||
pub end_column: Option<usize>,
|
pub evaluate_name: Option<String>,
|
||||||
pub can_restart: Option<bool>,
|
pub variables_reference: usize,
|
||||||
pub instruction_pointer_reference: Option<String>,
|
pub named_variables: Option<usize>,
|
||||||
pub module_id: Option<Value>,
|
pub indexed_variables: Option<usize>,
|
||||||
pub presentation_hint: Option<String>,
|
pub memory_reference: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
pub mod requests {
|
||||||
#[serde(rename_all = "camelCase")]
|
use super::*;
|
||||||
pub struct StackTraceResponseBody {
|
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
||||||
pub total_frames: Option<usize>,
|
#[serde(rename_all = "camelCase")]
|
||||||
pub stack_frames: Vec<StackFrame>,
|
pub struct InitializeArguments {
|
||||||
}
|
#[serde(rename = "clientID")]
|
||||||
|
pub client_id: Option<String>,
|
||||||
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
pub client_name: Option<String>,
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename = "adapterID")]
|
||||||
pub struct Thread {
|
pub adapter_id: String,
|
||||||
pub id: usize,
|
pub locale: Option<String>,
|
||||||
pub name: String,
|
#[serde(rename = "linesStartAt1")]
|
||||||
}
|
pub lines_start_at_one: Option<bool>,
|
||||||
|
#[serde(rename = "columnsStartAt1")]
|
||||||
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
pub columns_start_at_one: Option<bool>,
|
||||||
#[serde(rename_all = "camelCase")]
|
pub path_format: Option<String>,
|
||||||
pub struct ThreadsResponseBody {
|
pub supports_variable_type: Option<bool>,
|
||||||
pub threads: Vec<Thread>,
|
pub supports_variable_paging: Option<bool>,
|
||||||
}
|
pub supports_run_in_terminal_request: Option<bool>,
|
||||||
|
pub supports_memory_references: Option<bool>,
|
||||||
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
pub supports_progress_reporting: Option<bool>,
|
||||||
#[serde(rename_all = "camelCase")]
|
pub supports_invalidated_event: Option<bool>,
|
||||||
pub struct ScopesArguments {
|
}
|
||||||
pub frame_id: usize,
|
|
||||||
}
|
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
||||||
|
#[serde(rename_all = "camelCase")]
|
||||||
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
pub struct SetBreakpointsArguments {
|
||||||
#[serde(rename_all = "camelCase")]
|
pub source: Source,
|
||||||
pub struct Scope {
|
pub breakpoints: Option<Vec<SourceBreakpoint>>,
|
||||||
pub name: String,
|
// lines is deprecated
|
||||||
pub presentation_hint: Option<String>,
|
pub source_modified: Option<bool>,
|
||||||
pub variables_reference: usize,
|
}
|
||||||
pub named_variables: Option<usize>,
|
|
||||||
pub indexed_variables: Option<usize>,
|
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
||||||
pub expensive: bool,
|
#[serde(rename_all = "camelCase")]
|
||||||
pub source: Option<Source>,
|
pub struct SetBreakpointsResponse {
|
||||||
pub line: Option<usize>,
|
pub breakpoints: Option<Vec<Breakpoint>>,
|
||||||
pub column: Option<usize>,
|
}
|
||||||
pub end_line: Option<usize>,
|
|
||||||
pub end_column: Option<usize>,
|
#[derive(Debug)]
|
||||||
}
|
pub enum SetBreakpoints {}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
impl Request for SetBreakpoints {
|
||||||
#[serde(rename_all = "camelCase")]
|
type Arguments = SetBreakpointsArguments;
|
||||||
pub struct ScopesResponseBody {
|
type Result = SetBreakpointsResponse;
|
||||||
pub scopes: Vec<Scope>,
|
const COMMAND: &'static str = "setBreakpoints";
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct ValueFormat {
|
pub struct ContinueArguments {
|
||||||
pub hex: Option<bool>,
|
pub thread_id: usize,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct VariablesArguments {
|
pub struct ContinueResponse {
|
||||||
pub variables_reference: usize,
|
pub all_threads_continued: Option<bool>,
|
||||||
pub filter: Option<String>,
|
}
|
||||||
pub start: Option<usize>,
|
|
||||||
pub count: Option<usize>,
|
#[derive(Debug)]
|
||||||
pub format: Option<ValueFormat>,
|
pub enum Continue {}
|
||||||
}
|
|
||||||
|
impl Request for Continue {
|
||||||
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
type Arguments = ContinueArguments;
|
||||||
#[serde(rename_all = "camelCase")]
|
type Result = ContinueResponse;
|
||||||
pub struct VariablePresentationHint {
|
const COMMAND: &'static str = "continue";
|
||||||
pub kind: Option<String>,
|
}
|
||||||
pub attributes: Option<Vec<String>>,
|
|
||||||
pub visibility: Option<String>,
|
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
||||||
}
|
#[serde(rename_all = "camelCase")]
|
||||||
|
pub struct StackTraceArguments {
|
||||||
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
pub thread_id: usize,
|
||||||
#[serde(rename_all = "camelCase")]
|
pub start_frame: Option<usize>,
|
||||||
pub struct Variable {
|
pub levels: Option<usize>,
|
||||||
pub name: String,
|
pub format: Option<StackFrameFormat>,
|
||||||
pub value: String,
|
}
|
||||||
#[serde(rename = "type")]
|
|
||||||
pub data_type: Option<String>,
|
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
||||||
pub presentation_hint: Option<VariablePresentationHint>,
|
#[serde(rename_all = "camelCase")]
|
||||||
pub evaluate_name: Option<String>,
|
pub struct StackTraceResponse {
|
||||||
pub variables_reference: usize,
|
pub total_frames: Option<usize>,
|
||||||
pub named_variables: Option<usize>,
|
pub stack_frames: Vec<StackFrame>,
|
||||||
pub indexed_variables: Option<usize>,
|
}
|
||||||
pub memory_reference: Option<String>,
|
|
||||||
}
|
#[derive(Debug)]
|
||||||
|
pub enum StackTrace {}
|
||||||
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
|
||||||
#[serde(rename_all = "camelCase")]
|
impl Request for StackTrace {
|
||||||
pub struct VariablesResponseBody {
|
type Arguments = StackTraceArguments;
|
||||||
pub variables: Vec<Variable>,
|
type Result = StackTraceResponse;
|
||||||
}
|
const COMMAND: &'static str = "stackTrace";
|
||||||
|
}
|
||||||
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
|
||||||
#[serde(rename_all = "camelCase")]
|
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
||||||
pub struct OutputEventBody {
|
#[serde(rename_all = "camelCase")]
|
||||||
pub output: String,
|
pub struct ThreadsResponse {
|
||||||
pub category: Option<String>,
|
pub threads: Vec<Thread>,
|
||||||
pub group: Option<String>,
|
}
|
||||||
pub line: Option<usize>,
|
|
||||||
pub column: Option<usize>,
|
#[derive(Debug)]
|
||||||
pub variables_reference: Option<usize>,
|
pub enum Threads {}
|
||||||
pub source: Option<Source>,
|
|
||||||
pub data: Option<Value>,
|
impl Request for Threads {
|
||||||
}
|
type Arguments = ();
|
||||||
|
type Result = ThreadsResponse;
|
||||||
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
const COMMAND: &'static str = "threads";
|
||||||
#[serde(rename_all = "camelCase")]
|
}
|
||||||
pub struct StoppedEventBody {
|
|
||||||
pub reason: String,
|
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
||||||
pub description: Option<String>,
|
#[serde(rename_all = "camelCase")]
|
||||||
pub thread_id: Option<usize>,
|
pub struct ScopesArguments {
|
||||||
pub preserve_focus_hint: Option<bool>,
|
pub frame_id: usize,
|
||||||
pub text: Option<String>,
|
}
|
||||||
pub all_threads_stopped: Option<bool>,
|
|
||||||
pub hit_breakpoint_ids: Option<Vec<usize>>,
|
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
||||||
}
|
#[serde(rename_all = "camelCase")]
|
||||||
|
pub struct ScopesResponse {
|
||||||
|
pub scopes: Vec<Scope>,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
|
pub enum Scopes {}
|
||||||
|
|
||||||
|
impl Request for Scopes {
|
||||||
|
type Arguments = ScopesArguments;
|
||||||
|
type Result = ScopesResponse;
|
||||||
|
const COMMAND: &'static str = "scopes";
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
||||||
|
#[serde(rename_all = "camelCase")]
|
||||||
|
pub struct VariablesArguments {
|
||||||
|
pub variables_reference: usize,
|
||||||
|
pub filter: Option<String>,
|
||||||
|
pub start: Option<usize>,
|
||||||
|
pub count: Option<usize>,
|
||||||
|
pub format: Option<ValueFormat>,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
||||||
|
#[serde(rename_all = "camelCase")]
|
||||||
|
pub struct VariablesResponse {
|
||||||
|
pub variables: Vec<Variable>,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
|
pub enum Variables {}
|
||||||
|
|
||||||
|
impl Request for Variables {
|
||||||
|
type Arguments = VariablesArguments;
|
||||||
|
type Result = VariablesResponse;
|
||||||
|
const COMMAND: &'static str = "scopes";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Events
|
||||||
|
|
||||||
|
pub mod events {
|
||||||
|
use super::*;
|
||||||
|
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
||||||
|
#[serde(rename_all = "camelCase")]
|
||||||
|
pub struct Output {
|
||||||
|
pub output: String,
|
||||||
|
pub category: Option<String>,
|
||||||
|
pub group: Option<String>,
|
||||||
|
pub line: Option<usize>,
|
||||||
|
pub column: Option<usize>,
|
||||||
|
pub variables_reference: Option<usize>,
|
||||||
|
pub source: Option<Source>,
|
||||||
|
pub data: Option<Value>,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
||||||
|
#[serde(rename_all = "camelCase")]
|
||||||
|
pub struct Stopped {
|
||||||
|
pub reason: String,
|
||||||
|
pub description: Option<String>,
|
||||||
|
pub thread_id: Option<usize>,
|
||||||
|
pub preserve_focus_hint: Option<bool>,
|
||||||
|
pub text: Option<String>,
|
||||||
|
pub all_threads_stopped: Option<bool>,
|
||||||
|
pub hit_breakpoint_ids: Option<Vec<usize>>,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue