Skip to main content

euv_cli/fmt/
struct.rs

1use crate::*;
2
3/// Result of formatting a single file.
4///
5/// Indicates whether the file was already formatted or needed changes,
6/// and provides the formatted output when applicable.
7#[derive(Data, New)]
8pub struct FmtResult {
9    /// Whether the file content was changed by formatting.
10    #[get(pub, type(copy))]
11    #[get_mut(pub)]
12    #[set(pub)]
13    pub changed: bool,
14    /// The formatted file content (identical to input if `changed` is false).
15    #[get(pub)]
16    #[get_mut(pub)]
17    #[set(pub)]
18    pub output: String,
19}