pub struct Fold {
pub start_line: u32,
pub end_line: u32,
pub closed: bool,
pub identity: Option<u64>,
}Expand description
One open completion popup (DESIGN.md §5.11.3 vertico-style
rendering). Built by Action::CommandLineCompleteOrAdvance
when the user presses Tab; consumed by accept / dismiss / scroll
actions.
One contiguous fold range in a document buffer.
identity is the stable handle used to carry closed-state
across recomputes. Computed providers (indent / markdown) hash
the trimmed start-line text together with the leading-indent
depth so that adding or removing lines elsewhere in the buffer
doesn’t reopen this fold. Manual folds (zf) leave it None
– their stable identity is the line range itself.
Phase 5.2: moved from lattice-ui-tui::app::Fold to this
renderer-agnostic home. Existing crate::app::Fold call sites
continue to resolve via a pub use lattice_core::Fold;
re-export in lattice-ui-tui::app.
Fields§
§start_line: u32First line of the fold, 0-based. Stays visible when the fold is closed (it carries the summary).
end_line: u32Last line of the fold, 0-based and inclusive. Providers only emit
folds with end_line > start_line.
closed: boolWhether the fold is collapsed, hiding start_line + 1 ..= end_line.
identity: Option<u64>Stable identity used to carry closed across recomputes; None for
manual folds, whose identity is the line range. See the type docs.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Fold
impl RefUnwindSafe for Fold
impl Send for Fold
impl Sync for Fold
impl Unpin for Fold
impl UnsafeUnpin for Fold
impl UnwindSafe for Fold
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more