pub struct BuffersRenderState {
pub registry: BufferRegistry,
pub uris: Arc<HashMap<BufferId, Uri>>,
}Expand description
Buffer registry’s render-side projection — the list of buffers the editor knows about, independent of which one is currently active.
Per “everything is a buffer” (CLAUDE.md): files, help, oil,
file-tree, *messages*, scratch — all are entries in this
one index. Active-buffer hot-path state lives in
ActiveDocumentRenderState; this sub-state is touched on
registry changes only.
Phase 5.8.AF.5 / Slice 3c.final.B (group 1): populated.
registry carries a clone of the editor’s [BufferRegistry]
— the registry is internally Arc<Mutex<...>>-backed so the
clone is one Arc bump and the inner lookups (document_handle,
name_of, with_oil, flags_of, kind_of) see the latest
editor state without any further publication.
uris mirrors Editor::buffer_uris — published as a fresh
HashMap clone per publish since the editor’s field is owned
directly. The renderer reads rs.buffers.uris.get(&id) instead
of app.editor.buffer_uris.get(&id).
Fields§
§registry: BufferRegistryCloned crate::buffer_registry::BufferRegistry. Wait-free
to construct (one Arc bump); inner methods take their own
lock for each call.
uris: Arc<HashMap<BufferId, Uri>>LSP URI per buffer id. Published fresh each tick. For ~10
buffers the clone is sub-µs; if the registry grows large,
migrate to Arc<HashMap<...>> on the editor side to
collapse the clone into one Arc bump.
Trait Implementations§
Source§impl Clone for BuffersRenderState
impl Clone for BuffersRenderState
Source§fn clone(&self) -> BuffersRenderState
fn clone(&self) -> BuffersRenderState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BuffersRenderState
impl Debug for BuffersRenderState
Source§impl Default for BuffersRenderState
impl Default for BuffersRenderState
Source§fn default() -> BuffersRenderState
fn default() -> BuffersRenderState
Auto Trait Implementations§
impl !RefUnwindSafe for BuffersRenderState
impl !UnwindSafe for BuffersRenderState
impl Freeze for BuffersRenderState
impl Send for BuffersRenderState
impl Sync for BuffersRenderState
impl Unpin for BuffersRenderState
impl UnsafeUnpin for BuffersRenderState
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