pub struct InlineFold {
pub row: u32,
pub open: u32,
pub close: u32,
}Expand description
One resolved inline fold — a collapsed single-line bracket pair. It hides
the bytes between the brackets (open+1..close) on one still-visible row,
rendered [ … ]. The delimiters stay; only the interior collapses, so close
remains a real, addressable buffer position.
Fields§
§row: u32The buffer row the pair sits on (opener and closer share it).
open: u32Byte offset of the opening bracket.
close: u32Byte offset of the closing bracket.
Implementations§
Source§impl InlineFold
impl InlineFold
Sourcepub fn right_edge(&self) -> u32
pub fn right_edge(&self) -> u32
The RIGHT landable edge: the closing bracket itself.
Sourcepub fn hides_caret_at(&self, off: u32) -> bool
pub fn hides_caret_at(&self, off: u32) -> bool
Whether caret offset off is strictly inside the collapsed gap — the one
caret-boundary rule shared by movement, the document’s fold-time caret
pull-out, and the widget’s projections.
Sourcepub fn hides_glyph_at(&self, off: u32) -> bool
pub fn hides_glyph_at(&self, off: u32) -> bool
Whether the glyph at off is hidden by this fold — the deliberately
off-by-one sibling of Self::hides_caret_at: the glyph at open+1
hides even though its caret slot stays landable.
Trait Implementations§
Source§impl Clone for InlineFold
impl Clone for InlineFold
Source§fn clone(&self) -> InlineFold
fn clone(&self) -> InlineFold
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 InlineFold
Source§impl Debug for InlineFold
impl Debug for InlineFold
impl Eq for InlineFold
Source§impl PartialEq for InlineFold
impl PartialEq for InlineFold
impl StructuralPartialEq for InlineFold
Auto Trait Implementations§
impl Freeze for InlineFold
impl RefUnwindSafe for InlineFold
impl Send for InlineFold
impl Sync for InlineFold
impl Unpin for InlineFold
impl UnsafeUnpin for InlineFold
impl UnwindSafe for InlineFold
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.