mirror of
https://github.com/helix-editor/helix.git
synced 2025-04-04 19:37:54 +03:00
DAP: Skip serializing Option
s when None
DAP follows the same strict TypeScript interface syntax as LSP which states: > The document uses TypeScript interfaces in strict mode to describe > these. This means for example that a `null` value has to be explicitly > listed and that a mandatory property must be listed even if a falsify > value might exist. So we have to skip serializing any fields that end in `?` instead of passing `null`.
This commit is contained in:
parent
936ed3a226
commit
44f596334a
1 changed files with 168 additions and 6 deletions
|
@ -27,9 +27,11 @@ pub trait Request {
|
||||||
pub struct ColumnDescriptor {
|
pub struct ColumnDescriptor {
|
||||||
pub attribute_name: String,
|
pub attribute_name: String,
|
||||||
pub label: String,
|
pub label: String,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub format: Option<String>,
|
pub format: Option<String>,
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type", skip_serializing_if = "Option::is_none")]
|
||||||
pub ty: Option<String>,
|
pub ty: Option<String>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub width: Option<usize>,
|
pub width: Option<usize>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,52 +40,94 @@ pub struct ColumnDescriptor {
|
||||||
pub struct ExceptionBreakpointsFilter {
|
pub struct ExceptionBreakpointsFilter {
|
||||||
pub filter: String,
|
pub filter: String,
|
||||||
pub label: String,
|
pub label: String,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub description: Option<String>,
|
pub description: Option<String>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub default: Option<bool>,
|
pub default: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub supports_condition: Option<bool>,
|
pub supports_condition: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub condition_description: Option<String>,
|
pub condition_description: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct DebuggerCapabilities {
|
pub struct DebuggerCapabilities {
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub supports_configuration_done_request: Option<bool>,
|
pub supports_configuration_done_request: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub supports_function_breakpoints: Option<bool>,
|
pub supports_function_breakpoints: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub supports_conditional_breakpoints: Option<bool>,
|
pub supports_conditional_breakpoints: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub supports_hit_conditional_breakpoints: Option<bool>,
|
pub supports_hit_conditional_breakpoints: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub supports_evaluate_for_hovers: Option<bool>,
|
pub supports_evaluate_for_hovers: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub supports_step_back: Option<bool>,
|
pub supports_step_back: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub supports_set_variable: Option<bool>,
|
pub supports_set_variable: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub supports_restart_frame: Option<bool>,
|
pub supports_restart_frame: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub supports_goto_targets_request: Option<bool>,
|
pub supports_goto_targets_request: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub supports_step_in_targets_request: Option<bool>,
|
pub supports_step_in_targets_request: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub supports_completions_request: Option<bool>,
|
pub supports_completions_request: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub supports_modules_request: Option<bool>,
|
pub supports_modules_request: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub supports_restart_request: Option<bool>,
|
pub supports_restart_request: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub supports_exception_options: Option<bool>,
|
pub supports_exception_options: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub supports_value_formatting_options: Option<bool>,
|
pub supports_value_formatting_options: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub supports_exception_info_request: Option<bool>,
|
pub supports_exception_info_request: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub support_terminate_debuggee: Option<bool>,
|
pub support_terminate_debuggee: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub support_suspend_debuggee: Option<bool>,
|
pub support_suspend_debuggee: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub supports_delayed_stack_trace_loading: Option<bool>,
|
pub supports_delayed_stack_trace_loading: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub supports_loaded_sources_request: Option<bool>,
|
pub supports_loaded_sources_request: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub supports_log_points: Option<bool>,
|
pub supports_log_points: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub supports_terminate_threads_request: Option<bool>,
|
pub supports_terminate_threads_request: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub supports_set_expression: Option<bool>,
|
pub supports_set_expression: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub supports_terminate_request: Option<bool>,
|
pub supports_terminate_request: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub supports_data_breakpoints: Option<bool>,
|
pub supports_data_breakpoints: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub supports_read_memory_request: Option<bool>,
|
pub supports_read_memory_request: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub supports_write_memory_request: Option<bool>,
|
pub supports_write_memory_request: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub supports_disassemble_request: Option<bool>,
|
pub supports_disassemble_request: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub supports_cancel_request: Option<bool>,
|
pub supports_cancel_request: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub supports_breakpoint_locations_request: Option<bool>,
|
pub supports_breakpoint_locations_request: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub supports_clipboard_context: Option<bool>,
|
pub supports_clipboard_context: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub supports_stepping_granularity: Option<bool>,
|
pub supports_stepping_granularity: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub supports_instruction_breakpoints: Option<bool>,
|
pub supports_instruction_breakpoints: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub supports_exception_filter_options: Option<bool>,
|
pub supports_exception_filter_options: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub exception_breakpoint_filters: Option<Vec<ExceptionBreakpointsFilter>>,
|
pub exception_breakpoint_filters: Option<Vec<ExceptionBreakpointsFilter>>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub completion_trigger_characters: Option<Vec<String>>,
|
pub completion_trigger_characters: Option<Vec<String>>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub additional_module_columns: Option<Vec<ColumnDescriptor>>,
|
pub additional_module_columns: Option<Vec<ColumnDescriptor>>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub supported_checksum_algorithms: Option<Vec<String>>,
|
pub supported_checksum_algorithms: Option<Vec<String>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,13 +141,21 @@ pub struct Checksum {
|
||||||
#[derive(Debug, Default, PartialEq, Clone, Deserialize, Serialize)]
|
#[derive(Debug, Default, PartialEq, Clone, Deserialize, Serialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Source {
|
pub struct Source {
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub name: Option<String>,
|
pub name: Option<String>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub path: Option<PathBuf>,
|
pub path: Option<PathBuf>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub source_reference: Option<usize>,
|
pub source_reference: Option<usize>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub presentation_hint: Option<String>,
|
pub presentation_hint: Option<String>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub origin: Option<String>,
|
pub origin: Option<String>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub sources: Option<Vec<Source>>,
|
pub sources: Option<Vec<Source>>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub adapter_data: Option<Value>,
|
pub adapter_data: Option<Value>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub checksums: Option<Vec<Checksum>>,
|
pub checksums: Option<Vec<Checksum>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -111,36 +163,56 @@ pub struct Source {
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct SourceBreakpoint {
|
pub struct SourceBreakpoint {
|
||||||
pub line: usize,
|
pub line: usize,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub column: Option<usize>,
|
pub column: Option<usize>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub condition: Option<String>,
|
pub condition: Option<String>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub hit_condition: Option<String>,
|
pub hit_condition: Option<String>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub log_message: Option<String>,
|
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 Breakpoint {
|
pub struct Breakpoint {
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub id: Option<usize>,
|
pub id: Option<usize>,
|
||||||
pub verified: bool,
|
pub verified: bool,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub message: Option<String>,
|
pub message: Option<String>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub source: Option<Source>,
|
pub source: Option<Source>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub line: Option<usize>,
|
pub line: Option<usize>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub column: Option<usize>,
|
pub column: Option<usize>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub end_line: Option<usize>,
|
pub end_line: Option<usize>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub end_column: Option<usize>,
|
pub end_column: Option<usize>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub instruction_reference: Option<String>,
|
pub instruction_reference: Option<String>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub offset: Option<usize>,
|
pub offset: Option<usize>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[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 StackFrameFormat {
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub parameters: Option<bool>,
|
pub parameters: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub parameter_types: Option<bool>,
|
pub parameter_types: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub parameter_names: Option<bool>,
|
pub parameter_names: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub parameter_values: Option<bool>,
|
pub parameter_values: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub line: Option<bool>,
|
pub line: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub module: Option<bool>,
|
pub module: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub include_all: Option<bool>,
|
pub include_all: Option<bool>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -149,14 +221,21 @@ pub struct StackFrameFormat {
|
||||||
pub struct StackFrame {
|
pub struct StackFrame {
|
||||||
pub id: usize,
|
pub id: usize,
|
||||||
pub name: String,
|
pub name: String,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub source: Option<Source>,
|
pub source: Option<Source>,
|
||||||
pub line: usize,
|
pub line: usize,
|
||||||
pub column: usize,
|
pub column: usize,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub end_line: Option<usize>,
|
pub end_line: Option<usize>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub end_column: Option<usize>,
|
pub end_column: Option<usize>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub can_restart: Option<bool>,
|
pub can_restart: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub instruction_pointer_reference: Option<String>,
|
pub instruction_pointer_reference: Option<String>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub module_id: Option<Value>,
|
pub module_id: Option<Value>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub presentation_hint: Option<String>,
|
pub presentation_hint: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -171,29 +250,41 @@ pub struct Thread {
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Scope {
|
pub struct Scope {
|
||||||
pub name: String,
|
pub name: String,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub presentation_hint: Option<String>,
|
pub presentation_hint: Option<String>,
|
||||||
pub variables_reference: usize,
|
pub variables_reference: usize,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub named_variables: Option<usize>,
|
pub named_variables: Option<usize>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub indexed_variables: Option<usize>,
|
pub indexed_variables: Option<usize>,
|
||||||
pub expensive: bool,
|
pub expensive: bool,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub source: Option<Source>,
|
pub source: Option<Source>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub line: Option<usize>,
|
pub line: Option<usize>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub column: Option<usize>,
|
pub column: Option<usize>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub end_line: Option<usize>,
|
pub end_line: Option<usize>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub end_column: Option<usize>,
|
pub end_column: Option<usize>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[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 ValueFormat {
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub hex: Option<bool>,
|
pub hex: Option<bool>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct VariablePresentationHint {
|
pub struct VariablePresentationHint {
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub kind: Option<String>,
|
pub kind: Option<String>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub attributes: Option<Vec<String>>,
|
pub attributes: Option<Vec<String>>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub visibility: Option<String>,
|
pub visibility: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -202,13 +293,18 @@ pub struct VariablePresentationHint {
|
||||||
pub struct Variable {
|
pub struct Variable {
|
||||||
pub name: String,
|
pub name: String,
|
||||||
pub value: String,
|
pub value: String,
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type", skip_serializing_if = "Option::is_none")]
|
||||||
pub ty: Option<String>,
|
pub ty: Option<String>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub presentation_hint: Option<VariablePresentationHint>,
|
pub presentation_hint: Option<VariablePresentationHint>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub evaluate_name: Option<String>,
|
pub evaluate_name: Option<String>,
|
||||||
pub variables_reference: usize,
|
pub variables_reference: usize,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub named_variables: Option<usize>,
|
pub named_variables: Option<usize>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub indexed_variables: Option<usize>,
|
pub indexed_variables: Option<usize>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub memory_reference: Option<String>,
|
pub memory_reference: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -217,13 +313,21 @@ pub struct Variable {
|
||||||
pub struct Module {
|
pub struct Module {
|
||||||
pub id: String, // TODO: || number
|
pub id: String, // TODO: || number
|
||||||
pub name: String,
|
pub name: String,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub path: Option<PathBuf>,
|
pub path: Option<PathBuf>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub is_optimized: Option<bool>,
|
pub is_optimized: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub is_user_code: Option<bool>,
|
pub is_user_code: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub version: Option<String>,
|
pub version: Option<String>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub symbol_status: Option<String>,
|
pub symbol_status: Option<String>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub symbol_file_path: Option<String>,
|
pub symbol_file_path: Option<String>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub date_time_stamp: Option<String>,
|
pub date_time_stamp: Option<String>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub address_range: Option<String>,
|
pub address_range: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -232,22 +336,31 @@ pub mod requests {
|
||||||
#[derive(Debug, Default, PartialEq, Clone, Deserialize, Serialize)]
|
#[derive(Debug, Default, PartialEq, Clone, Deserialize, Serialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct InitializeArguments {
|
pub struct InitializeArguments {
|
||||||
#[serde(rename = "clientID")]
|
#[serde(rename = "clientID", skip_serializing_if = "Option::is_none")]
|
||||||
pub client_id: Option<String>,
|
pub client_id: Option<String>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub client_name: Option<String>,
|
pub client_name: Option<String>,
|
||||||
#[serde(rename = "adapterID")]
|
#[serde(rename = "adapterID")]
|
||||||
pub adapter_id: String,
|
pub adapter_id: String,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub locale: Option<String>,
|
pub locale: Option<String>,
|
||||||
#[serde(rename = "linesStartAt1")]
|
#[serde(rename = "linesStartAt1", skip_serializing_if = "Option::is_none")]
|
||||||
pub lines_start_at_one: Option<bool>,
|
pub lines_start_at_one: Option<bool>,
|
||||||
#[serde(rename = "columnsStartAt1")]
|
#[serde(rename = "columnsStartAt1", skip_serializing_if = "Option::is_none")]
|
||||||
pub columns_start_at_one: Option<bool>,
|
pub columns_start_at_one: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub path_format: Option<String>,
|
pub path_format: Option<String>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub supports_variable_type: Option<bool>,
|
pub supports_variable_type: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub supports_variable_paging: Option<bool>,
|
pub supports_variable_paging: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub supports_run_in_terminal_request: Option<bool>,
|
pub supports_run_in_terminal_request: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub supports_memory_references: Option<bool>,
|
pub supports_memory_references: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub supports_progress_reporting: Option<bool>,
|
pub supports_progress_reporting: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub supports_invalidated_event: Option<bool>,
|
pub supports_invalidated_event: Option<bool>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -300,14 +413,17 @@ pub mod requests {
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct SetBreakpointsArguments {
|
pub struct SetBreakpointsArguments {
|
||||||
pub source: Source,
|
pub source: Source,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub breakpoints: Option<Vec<SourceBreakpoint>>,
|
pub breakpoints: Option<Vec<SourceBreakpoint>>,
|
||||||
// lines is deprecated
|
// lines is deprecated
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub source_modified: Option<bool>,
|
pub source_modified: Option<bool>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Default, PartialEq, Clone, Deserialize, Serialize)]
|
#[derive(Debug, Default, PartialEq, Clone, Deserialize, Serialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct SetBreakpointsResponse {
|
pub struct SetBreakpointsResponse {
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub breakpoints: Option<Vec<Breakpoint>>,
|
pub breakpoints: Option<Vec<Breakpoint>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -329,6 +445,7 @@ pub mod requests {
|
||||||
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct ContinueResponse {
|
pub struct ContinueResponse {
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub all_threads_continued: Option<bool>,
|
pub all_threads_continued: Option<bool>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -345,14 +462,18 @@ pub mod requests {
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct StackTraceArguments {
|
pub struct StackTraceArguments {
|
||||||
pub thread_id: ThreadId,
|
pub thread_id: ThreadId,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub start_frame: Option<usize>,
|
pub start_frame: Option<usize>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub levels: Option<usize>,
|
pub levels: Option<usize>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub format: Option<StackFrameFormat>,
|
pub format: Option<StackFrameFormat>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct StackTraceResponse {
|
pub struct StackTraceResponse {
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub total_frames: Option<usize>,
|
pub total_frames: Option<usize>,
|
||||||
pub stack_frames: Vec<StackFrame>,
|
pub stack_frames: Vec<StackFrame>,
|
||||||
}
|
}
|
||||||
|
@ -406,9 +527,13 @@ pub mod requests {
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct VariablesArguments {
|
pub struct VariablesArguments {
|
||||||
pub variables_reference: usize,
|
pub variables_reference: usize,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub filter: Option<String>,
|
pub filter: Option<String>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub start: Option<usize>,
|
pub start: Option<usize>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub count: Option<usize>,
|
pub count: Option<usize>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub format: Option<ValueFormat>,
|
pub format: Option<ValueFormat>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -431,7 +556,9 @@ pub mod requests {
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct StepInArguments {
|
pub struct StepInArguments {
|
||||||
pub thread_id: ThreadId,
|
pub thread_id: ThreadId,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub target_id: Option<usize>,
|
pub target_id: Option<usize>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub granularity: Option<String>,
|
pub granularity: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -448,6 +575,7 @@ pub mod requests {
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct StepOutArguments {
|
pub struct StepOutArguments {
|
||||||
pub thread_id: ThreadId,
|
pub thread_id: ThreadId,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub granularity: Option<String>,
|
pub granularity: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -464,6 +592,7 @@ pub mod requests {
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct NextArguments {
|
pub struct NextArguments {
|
||||||
pub thread_id: ThreadId,
|
pub thread_id: ThreadId,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub granularity: Option<String>,
|
pub granularity: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -495,8 +624,11 @@ pub mod requests {
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct EvaluateArguments {
|
pub struct EvaluateArguments {
|
||||||
pub expression: String,
|
pub expression: String,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub frame_id: Option<usize>,
|
pub frame_id: Option<usize>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub context: Option<String>,
|
pub context: Option<String>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub format: Option<ValueFormat>,
|
pub format: Option<ValueFormat>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -504,12 +636,16 @@ pub mod requests {
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct EvaluateResponse {
|
pub struct EvaluateResponse {
|
||||||
pub result: String,
|
pub result: String,
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type", skip_serializing_if = "Option::is_none")]
|
||||||
pub ty: Option<String>,
|
pub ty: Option<String>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub presentation_hint: Option<VariablePresentationHint>,
|
pub presentation_hint: Option<VariablePresentationHint>,
|
||||||
pub variables_reference: usize,
|
pub variables_reference: usize,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub named_variables: Option<usize>,
|
pub named_variables: Option<usize>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub indexed_variables: Option<usize>,
|
pub indexed_variables: Option<usize>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub memory_reference: Option<String>,
|
pub memory_reference: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -533,6 +669,7 @@ pub mod requests {
|
||||||
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct SetExceptionBreakpointsResponse {
|
pub struct SetExceptionBreakpointsResponse {
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub breakpoints: Option<Vec<Breakpoint>>,
|
pub breakpoints: Option<Vec<Breakpoint>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -550,17 +687,23 @@ pub mod requests {
|
||||||
#[derive(Debug, Default, PartialEq, Clone, Deserialize, Serialize)]
|
#[derive(Debug, Default, PartialEq, Clone, Deserialize, Serialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct RunInTerminalResponse {
|
pub struct RunInTerminalResponse {
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub process_id: Option<u32>,
|
pub process_id: Option<u32>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub shell_process_id: Option<u32>,
|
pub shell_process_id: Option<u32>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct RunInTerminalArguments {
|
pub struct RunInTerminalArguments {
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub kind: Option<String>,
|
pub kind: Option<String>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub title: Option<String>,
|
pub title: Option<String>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub cwd: Option<String>,
|
pub cwd: Option<String>,
|
||||||
pub args: Vec<String>,
|
pub args: Vec<String>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub env: Option<HashMap<String, Option<String>>>,
|
pub env: Option<HashMap<String, Option<String>>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -607,11 +750,17 @@ pub mod events {
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Stopped {
|
pub struct Stopped {
|
||||||
pub reason: String,
|
pub reason: String,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub description: Option<String>,
|
pub description: Option<String>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub thread_id: Option<ThreadId>,
|
pub thread_id: Option<ThreadId>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub preserve_focus_hint: Option<bool>,
|
pub preserve_focus_hint: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub text: Option<String>,
|
pub text: Option<String>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub all_threads_stopped: Option<bool>,
|
pub all_threads_stopped: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub hit_breakpoint_ids: Option<Vec<usize>>,
|
pub hit_breakpoint_ids: Option<Vec<usize>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -619,6 +768,7 @@ pub mod events {
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Continued {
|
pub struct Continued {
|
||||||
pub thread_id: ThreadId,
|
pub thread_id: ThreadId,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub all_threads_continued: Option<bool>,
|
pub all_threads_continued: Option<bool>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -631,6 +781,7 @@ pub mod events {
|
||||||
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Terminated {
|
pub struct Terminated {
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub restart: Option<Value>,
|
pub restart: Option<Value>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -645,12 +796,19 @@ pub mod events {
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Output {
|
pub struct Output {
|
||||||
pub output: String,
|
pub output: String,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub category: Option<String>,
|
pub category: Option<String>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub group: Option<String>,
|
pub group: Option<String>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub line: Option<usize>,
|
pub line: Option<usize>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub column: Option<usize>,
|
pub column: Option<usize>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub variables_reference: Option<usize>,
|
pub variables_reference: Option<usize>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub source: Option<Source>,
|
pub source: Option<Source>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub data: Option<Value>,
|
pub data: Option<Value>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -679,9 +837,13 @@ pub mod events {
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct Process {
|
pub struct Process {
|
||||||
pub name: String,
|
pub name: String,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub system_process_id: Option<usize>,
|
pub system_process_id: Option<usize>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub is_local_process: Option<bool>,
|
pub is_local_process: Option<bool>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub start_method: Option<String>, // TODO: use enum
|
pub start_method: Option<String>, // TODO: use enum
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub pointer_size: Option<usize>,
|
pub pointer_size: Option<usize>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue