pub struct DiffModes {
pub comments: LayerMode,
pub imports: LayerMode,
pub logging: LayerMode,
pub formatting: LayerMode,
}Expand description
The part of Layers that changes a file’s diff: the span layers, and whether
formatting-only changes are shown.
Fields§
§comments: LayerMode§imports: LayerMode§logging: LayerMode§formatting: LayerModeImplementations§
Source§impl DiffModes
impl DiffModes
pub const SHOWN: DiffModes
pub fn mode(self, layer: SpanLayer) -> LayerMode
Sourcepub fn effective(self) -> (LayerMode, Vec<SpanLayer>)
pub fn effective(self) -> (LayerMode, Vec<SpanLayer>)
How the file is projected: any layer set to only wins, and shows the union of those layers; otherwise the hidden layers are cut out.
Sourcepub fn outcome(self) -> (LayerMode, String)
pub fn outcome(self) -> (LayerMode, String)
What the reviewer sees, for messages: only some layers, some hidden, or all shown, with the adjective naming those layers (“comment”, “comment/formatting”).
pub fn adjective(self) -> String
Trait Implementations§
impl Copy for DiffModes
impl Eq for DiffModes
impl StructuralPartialEq for DiffModes
Auto Trait Implementations§
impl Freeze for DiffModes
impl RefUnwindSafe for DiffModes
impl Send for DiffModes
impl Sync for DiffModes
impl Unpin for DiffModes
impl UnsafeUnpin for DiffModes
impl UnwindSafe for DiffModes
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more