Skip to main content

BufferData

Enum BufferData 

Source
pub enum BufferData {
    Document(DocumentEntry),
    FileTree(DocumentEntry),
    Help(DocumentEntry),
    Oil(DocumentEntry),
    Terminal(TerminalBuffer),
    Messages(DocumentEntry),
    Multibuffer(DocumentEntry),
    Dashboard(DocumentEntry),
}

Variants§

§

Document(DocumentEntry)

§

FileTree(DocumentEntry)

Hierarchical filesystem tree.

DL.4: storage is now identical to BufferData::Document — an actor-backed synthetic Document — exactly as Help converged at PU.1a. The discriminator stays so :ls, mode lookup and BufferKind::is_read_only can still tell a tree from a file.

It was its own struct with its own rope, which is why document_handle() returned None for it and the generic pane path could not render it at all — the reason four bespoke paint functions existed (CV.5, CV.6).

§

Help(DocumentEntry)

Help / log / picker-listing buffers placed into a pane (DESIGN.md §5.9, §5.11). The transient overlay path (App.popup_buffer) remains for popup-style displays (hover, doc lookups, error toasts); persistent help views (:lsp-log, :lsp-server-log, :lsp-trace-log, :describe-*, :diagnostics) route here so they live in a real pane, can be split, switched, listed via :ls, and updated live when their backing source emits events.

PU.1a (2026-06-27): storage is now identical to BufferData::Document (a DocumentEntry carrying Arc<dyn Document>) — help content is an actor-backed synthetic Document, exactly like BufferData::Messages. The discriminator stays so help-mode behaviours (links, anchors, dismiss-on-Esc, the markdown major) and :ls / introspection can tell a help view apart from a file. The help title lives in BufferEntry::name; per-buffer metadata (links / anchors / highlights) lives in buffer_locals.

§

Oil(DocumentEntry)

Flat editable directory listing (oil.nvim-style).

DL.5: storage is a DocumentEntry like every other kind — the last one to converge. Its rope is an actor-backed Document, and the directory snapshot :w diffs against lives in the OilSnapshotLocal buffer-local. Oil is writable, so it needs no owner-write bypass: edits go through the ordinary document path.

§

Terminal(TerminalBuffer)

§

Messages(DocumentEntry)

The editor’s *messages* audit transcript. Storage is identical to BufferData::Document (same DocumentEntry); the discriminator exists so :ls, modeline, and introspection paths can tell the transcript apart from a user-edited file. The subsystem owns content; messages-mode contributes ReadOnly + NoFile.

§

Multibuffer(DocumentEntry)

H.1 (2026-05-31): composed multibuffer view buffer (lattice-multibuffer). Storage is identical to BufferData::Document (the DocumentEntry’s handle: Arc<dyn Document> is a MultibufferDocumentHandle impl). The discriminator exists so :ls / picker display / mode lookup can distinguish a composed view from a regular Document. MultibufferMode (M.2.b.2) is the major mode; H.3’s Event::BufferOpened dispatch activates it.

§

Dashboard(DocumentEntry)

The *dashboard* launch page (DB.2). Storage is identical to BufferData::Document (same DocumentEntry); the discriminator exists so :ls / introspection tell the dashboard apart from a file, and so the follow / dismiss gates group it with help-style buffers. dashboard-mode is the major mode; it contributes ReadOnly + NoFile. See docs/dev/architecture/dashboard.md §9.2.

Trait Implementations§

Source§

impl Debug for BufferData

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert 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>

Convert 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)

Convert &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)

Convert &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
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync> ⓘ

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
§

impl<T> IntoMaybeUndefined<T> for T

§

fn into_maybe_undefined(self) -> MaybeUndefined<T>

Converts this value into a three-state builder argument.
§

impl<T> IntoOption<T> for T

§

fn into_option(self) -> Option<T>

Converts this value into an optional builder argument.
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Pointee for T

§

type Pointer = u32

§

fn debug( pointer: <T as Pointee>::Pointer, f: &mut Formatter<'_>, ) -> Result<(), Error>

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more