pub struct StrArena(/* private fields */);Expand description
Sealed UTF-8 string arena backed by a SpanPool<u8>.
Every write enters as a valid &str inside crate-private mutators, and live row readers
(RowRef) borrow both the row words and &StrArena under one shared 'a lifetime so hot
str_unchecked reads are O(1) and 100% sound (Rust’s borrow checker statically forbids
mutating the arena while any borrowed &'a str is alive). Detached StrSpan lookups use
checked UTF-8 validation (try_str / str).
The whole backing slab stays well-formed UTF-8 (it is published as NvSceneView::text_slab,
which hosts validate once per scene): every byte belongs to a live string or is 0x00.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Forget for StrArena
impl Freeze for StrArena
impl Move for StrArena
impl RefUnwindSafe for StrArena
impl Send for StrArenawhere
RawVecInner: Send,
impl Sync for StrArenawhere
RawVecInner: Sync,
impl Unpin for StrArena
impl UnsafeUnpin for StrArena
impl UnwindSafe for StrArenawhere
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