22 lines
564 B
Rust
22 lines
564 B
Rust
use std::fmt::Display;
|
|
|
|
#[cfg(feature = "serde")]
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
/// Pretty-printable flag to tell which conflicting edit (side)
|
|
/// an operation is associated with
|
|
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
|
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
|
pub enum Side {
|
|
Left,
|
|
Right,
|
|
}
|
|
|
|
impl Display for Side {
|
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
|
match self {
|
|
Side::Left => write!(f, "Left"),
|
|
Side::Right => write!(f, "Right"),
|
|
}
|
|
}
|
|
}
|