#[derive(Debug, PartialEq, Serialize, JsonSchema)]
pub struct PlatformInfo {
pub fsync: &'static str,
pub dir_fsync: &'static str,
#[serde(skip_serializing_if = "Option::is_none")]
pub durability: Option<&'static str>,
#[serde(skip_serializing_if = "Option::is_none")]
pub rename_method: Option<&'static str>,
#[serde(skip_serializing_if = "Option::is_none")]
pub backup_method: Option<&'static str>,
}
#[derive(Debug, PartialEq, Serialize, JsonSchema)]
pub struct LineRange {
pub start: usize,
pub end: usize,
}
#[derive(Debug, PartialEq, Serialize, JsonSchema)]
pub struct SearchBegin {
pub r#type: &'static str,
pub path: String,
}
#[derive(Debug, PartialEq, Serialize, JsonSchema)]
pub struct SearchMatch {
pub r#type: &'static str,
pub path: String,
pub line_number: u64,
pub lines: String,
pub byte_offset: u64,
#[serde(skip_serializing_if = "Vec::is_empty")]
pub submatches: Vec<Submatch>,
}
#[derive(Debug, PartialEq, Serialize, JsonSchema)]
pub struct SearchContext {
pub r#type: &'static str,
pub path: String,
pub line_number: u64,
pub lines: String,
}
#[derive(Debug, PartialEq, Serialize, JsonSchema)]
pub struct FileStats {
pub matches: u64,
pub lines_searched: u64,
}
#[derive(Debug, PartialEq, Serialize, JsonSchema)]
pub struct SearchFile {
pub r#type: &'static str,
pub path: String,
}
#[derive(Debug, PartialEq, Serialize, JsonSchema)]
pub struct ProgressEvent {
pub r#type: &'static str,
pub done: u64,
pub total: u64,
#[serde(skip_serializing_if = "Option::is_none")]
pub rate_per_s: Option<f64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub eta_ms: Option<u64>,
pub phase: String,
}
#[derive(Debug, PartialEq, Serialize, JsonSchema)]
pub struct CancelledEvent {
pub r#type: &'static str,
#[serde(skip_serializing_if = "Option::is_none")]
pub path: Option<String>,
pub reason: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub signal: Option<String>,
}
#[derive(Debug, Clone, PartialEq, Serialize, JsonSchema)]
pub struct PairResult {
pub index: u64,
pub matched: bool,
#[serde(skip_serializing_if = "Option::is_none")]
pub strategy: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub similarity: Option<f64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub source: Option<String>,
}
#[derive(Debug, PartialEq, Serialize, JsonSchema)]
pub struct ListEntry {
pub r#type: &'static str,
pub path: String,
pub kind: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub size: Option<u64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub modified: Option<String>,
}
#[derive(Debug, PartialEq, Serialize, JsonSchema)]
pub struct CalcOutput {
pub r#type: &'static str,
pub expression: String,
pub result: String,
pub elapsed_ms: u64,
}
#[derive(Debug, PartialEq, Serialize, JsonSchema)]
pub struct TransformResult {
pub r#type: &'static str,
pub path: String,
pub language: String,
pub matches: u64,
pub replacements: u64,
pub bytes_before: u64,
pub bytes_after: u64,
pub checksum_before: String,
pub checksum_after: String,
pub elapsed_ms: u64,
}
#[derive(Debug, PartialEq, Serialize, JsonSchema)]
pub struct BackupResult {
pub r#type: &'static str,
pub path: String,
pub backup_path: String,
pub checksum: String,
pub bytes: u64,
pub elapsed_ms: u64,
}
#[derive(Debug, Serialize, JsonSchema)]
pub struct BatchOpResult<'a> {
pub r#type: &'static str,
pub index: u64,
pub op: &'a str,
pub status: &'static str,
#[serde(skip_serializing_if = "Option::is_none")]
pub details: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub error: Option<String>,
pub elapsed_ms: u64,
}
#[derive(Debug, Serialize, JsonSchema)]
pub struct DiffUnifiedOutput {
pub r#type: &'static str,
pub identical: bool,
pub format: &'static str,
pub content: String,
pub similarity_ratio: f32,
pub elapsed_ms: u64,
}
#[derive(Debug, PartialEq, Serialize, JsonSchema)]
pub struct HashOutput {
pub r#type: &'static str,
#[serde(skip_serializing_if = "Option::is_none")]
pub path: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub source: Option<&'static str>,
pub algorithm: &'static str,
#[serde(rename = "checksum")]
pub value: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub bytes: Option<u64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub verified: Option<bool>,
pub elapsed_ms: u64,
}
#[derive(Debug, PartialEq, Serialize, JsonSchema)]
pub struct DeleteOutput {
pub r#type: &'static str,
pub path: String,
pub bytes: u64,
pub checksum_before: String,
pub elapsed_ms: u64,
#[serde(skip_serializing_if = "Vec::is_empty")]
pub warnings: Vec<String>,
}
#[derive(Debug, PartialEq, Serialize, JsonSchema)]
pub struct CountTotals {
pub files: u64,
pub lines: u64,
pub blank: u64,
pub bytes: u64,
}
#[derive(Debug, PartialEq, Serialize, JsonSchema)]
pub struct BackupSummary {
pub r#type: &'static str,
pub files_backed_up: u64,
pub total_bytes: u64,
pub dry_run: bool,
pub elapsed_ms: u64,
}
#[derive(Debug, PartialEq, Serialize, JsonSchema)]
pub struct ReplacePreview {
pub r#type: &'static str,
pub path: String,
pub replacements: u64,
pub diff: String,
}
#[derive(Debug, Serialize, JsonSchema)]
pub struct TextFieldsOutput<'a> {
pub r#type: &'static str,
pub fields: Vec<&'a str>,
}
#[derive(Debug, PartialEq, Serialize, JsonSchema)]
pub struct PruneBackupSummary {
pub r#type: &'static str,
pub action: String,
pub total: usize,
pub elapsed_ms: u64,
}
#[derive(Debug, PartialEq, Serialize, JsonSchema)]
pub struct EditLoopSummary {
pub r#type: &'static str,
pub action: String,
pub path: String,
pub pairs_total: usize,
pub pairs_applied: usize,
pub pairs_unmatched: usize,
pub elapsed_ms: u64,
pub pair_results: Vec<EditLoopPairResult>,
}
#[derive(Debug, PartialEq, Serialize, JsonSchema)]
pub struct SemanticMatchEvent {
pub r#type: &'static str,
pub rank: usize,
pub score: f64,
pub path: String,
pub line: u64,
pub snippet: String,
pub backend: &'static str,
}
#[derive(Debug, PartialEq, Serialize, JsonSchema)]
pub struct QueryKindEvent {
pub r#type: &'static str,
pub path: String,
pub language: String,
pub kind: String,
pub count: usize,
}
#[derive(Debug, PartialEq, Serialize, JsonSchema)]
pub struct RecipeStepEvent {
pub r#type: &'static str,
pub step: u64,
pub name: String,
pub status: String,
pub detail: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub checksum: Option<String>,
}
#[derive(Debug, Clone, PartialEq, Eq, Serialize, JsonSchema)]
pub struct CodemodRuleStats {
pub matches: u64,
pub files: u64,
}
#[derive(Debug, PartialEq, Serialize, JsonSchema)]
pub struct TransformRuleBegin {
pub r#type: &'static str,
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
pub language: String,
}
#[derive(Debug, PartialEq, Serialize, JsonSchema)]
pub struct SparseOutlineBudget {
pub r#type: &'static str,
pub files_seen: u64,
pub items: u64,
pub truncated: bool,
pub max_files: u64,
}