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(crate) struct FmtResult {
9    /// Whether the file content was changed by formatting.
10    #[get(pub(crate), type(copy))]
11    #[get_mut(pub(crate))]
12    #[set(pub(crate))]
13    pub(crate) changed: bool,
14    /// The formatted file content (identical to input if `changed` is false).
15    #[get(pub(crate))]
16    #[get_mut(pub(crate))]
17    #[set(pub(crate))]
18    pub(crate) output: String,
19}