pub enum SessionVisibility {
Shared,
OptIn,
}Expand description
Whether a session is shown to every view or only to the ones that ask for it.
The default is Shared, and it is the right default: a
spell-checker’s squiggles and a comment’s underline are facts about the text, so every
view of that text should draw them.
OptIn is for a layer that is a fact about one view
rather than about the text: a reading that marks every mention of one character, say.
Such a layer still lives on the document (there is nowhere else for a range session to
live), but a mask has to name it before anything renders it, so a second view of the same
document is left alone. Without this the only way to keep a layer out of a sibling view
would be HighlightMask::only, which means naming every session the view does want,
including ones it has no handle on, such as the widget’s own ambient caret band.
Variants§
Rendered by every view whose mask does not exclude it. The default.
OptIn
Rendered only by a view whose mask names it. See HighlightMask::with.
Trait Implementations§
Source§impl Clone for SessionVisibility
impl Clone for SessionVisibility
Source§fn clone(&self) -> SessionVisibility
fn clone(&self) -> SessionVisibility
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 SessionVisibility
Source§impl Debug for SessionVisibility
impl Debug for SessionVisibility
Source§impl Default for SessionVisibility
impl Default for SessionVisibility
Source§fn default() -> SessionVisibility
fn default() -> SessionVisibility
impl Eq for SessionVisibility
Source§impl PartialEq for SessionVisibility
impl PartialEq for SessionVisibility
impl StructuralPartialEq for SessionVisibility
Auto Trait Implementations§
impl Freeze for SessionVisibility
impl RefUnwindSafe for SessionVisibility
impl Send for SessionVisibility
impl Sync for SessionVisibility
impl Unpin for SessionVisibility
impl UnsafeUnpin for SessionVisibility
impl UnwindSafe for SessionVisibility
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
key and return true if they are equal.