pub enum OverridePriority {
Low,
Normal,
High,
}Expand description
Tie-break priority for two layer entries that target the same option.
Most modes use Normal; among Normals the
crate::Resolver prefers the higher layer (the mode registry
orders minor-mode layers by activation, so last-activated wins)
and lattice-mode emits a ModeEvent::OptionConflict event for
visibility. High / Low are explicit overrides
for modes that genuinely need to win or lose regardless of
activation order (read-only-mode ⇒ High for
writable=false).
See mode-architecture.md §6.2 for the conflict policy.
Variants§
Low
Loses to any Normal or High entry for the same option,
whatever its layer — a fallback a mode offers only if nobody
else has an opinion.
Normal
The default: resolved by layer order, then position in layer.
High
Beats every Normal / Low entry regardless of layer — except
a user’s buffer-local (:setlocal) value, which outranks any
mode contribution at any priority.
Trait Implementations§
Source§impl Clone for OverridePriority
impl Clone for OverridePriority
Source§fn clone(&self) -> OverridePriority
fn clone(&self) -> OverridePriority
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for OverridePriority
Source§impl Debug for OverridePriority
impl Debug for OverridePriority
Source§impl Default for OverridePriority
impl Default for OverridePriority
Source§fn default() -> OverridePriority
fn default() -> OverridePriority
impl Eq for OverridePriority
Source§impl Ord for OverridePriority
impl Ord for OverridePriority
Source§fn cmp(&self, other: &OverridePriority) -> Ordering
fn cmp(&self, other: &OverridePriority) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for OverridePriority
impl PartialEq for OverridePriority
Source§impl PartialOrd for OverridePriority
impl PartialOrd for OverridePriority
impl StructuralPartialEq for OverridePriority
Auto Trait Implementations§
impl Freeze for OverridePriority
impl RefUnwindSafe for OverridePriority
impl Send for OverridePriority
impl Sync for OverridePriority
impl Unpin for OverridePriority
impl UnsafeUnpin for OverridePriority
impl UnwindSafe for OverridePriority
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.