pub struct TabstopRange {
pub index: u32,
pub range: Range<usize>,
pub has_default: bool,
pub is_choice: bool,
}Expand description
Byte range a tabstop covers in the rendered text. Multiple
occurrences of the same tabstop index produce one
TabstopRange per occurrence – they’re “mirrors”; edits
in one ripple to the others.
Fields§
§index: u32Tabstop index. 0 is the snippet’s exit position.
range: Range<usize>Byte range in the rendered text.
has_default: boolWhether this range was a Placeholder with default
text vs a bare Tabstop. Affects the host’s “select
placeholder text on focus” UX (placeholders auto-
select their default for easy overwrite; bare tabstops
just place the cursor).
is_choice: boolWhether this range came from a Choice placeholder.
The host’s choice-picker UI fires on these.
Trait Implementations§
Source§impl Clone for TabstopRange
impl Clone for TabstopRange
Source§fn clone(&self) -> TabstopRange
fn clone(&self) -> TabstopRange
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TabstopRange
impl Debug for TabstopRange
impl Eq for TabstopRange
Source§impl PartialEq for TabstopRange
impl PartialEq for TabstopRange
impl StructuralPartialEq for TabstopRange
Auto Trait Implementations§
impl Freeze for TabstopRange
impl RefUnwindSafe for TabstopRange
impl Send for TabstopRange
impl Sync for TabstopRange
impl Unpin for TabstopRange
impl UnsafeUnpin for TabstopRange
impl UnwindSafe for TabstopRange
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,
§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
Compare self to
key and return true if they are equal.