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§fn clone(&self) -> FoldRegion
fn clone(&self) -> FoldRegion
Returns a duplicate of the value. Read more
1.0.0 · 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 FoldRegion
impl Debug for FoldRegion
Source§impl PartialEq for FoldRegion
impl PartialEq for FoldRegion
impl Eq for FoldRegion
impl StructuralPartialEq for FoldRegion
Auto Trait Implementations§
impl Freeze for FoldRegion
impl RefUnwindSafe for FoldRegion
impl Send for FoldRegion
impl Sync for FoldRegion
impl Unpin for FoldRegion
impl UnwindSafe for FoldRegion
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