pub struct FoldRegion {
pub start_line: usize,
pub end_line: usize,
pub is_collapsed: bool,
pub placeholder: String,
}Expand description
Fold region
Fields§
§start_line: usizeStart line number
end_line: usizeEnd line number (inclusive)
is_collapsed: boolWhether folded
placeholder: StringPlaceholder text shown when folded (e.g., “[…]”)
Implementations§
Source§impl FoldRegion
impl FoldRegion
Sourcepub fn new(start_line: usize, end_line: usize) -> Self
pub fn new(start_line: usize, end_line: usize) -> Self
Create a folding region for an inclusive line range.
Sourcepub fn with_placeholder(
start_line: usize,
end_line: usize,
placeholder: String,
) -> Self
pub fn with_placeholder( start_line: usize, end_line: usize, placeholder: String, ) -> Self
Create a folding region with a custom placeholder string.
Sourcepub fn contains_line(&self, line: usize) -> bool
pub fn contains_line(&self, line: usize) -> bool
Check if line number is within fold region
Trait Implementations§
Source§impl Clone for FoldRegion
impl Clone for FoldRegion
Source§impl Debug for FoldRegion
impl Debug for FoldRegion
impl Eq for FoldRegion
Source§impl PartialEq for FoldRegion
impl PartialEq for FoldRegion
impl StructuralPartialEq for FoldRegion
Auto Trait Implementations§
impl Forget for FoldRegion
impl Freeze for FoldRegion
impl Move for FoldRegion
impl RefUnwindSafe for FoldRegion
impl Send for FoldRegionwhere
RawVecInner: Send,
impl Sync for FoldRegionwhere
RawVecInner: Sync,
impl Unpin for FoldRegion
impl UnsafeUnpin for FoldRegion
impl UnwindSafe for FoldRegionwhere
RawVecInner: UnwindSafe,
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