pub struct SeqString { /* private fields */ }Expand description
String that tracks its allocation source
§Safety Invariants
- If global=true: ptr points to global-allocated String, must be dropped
- If global=false: ptr points to thread-local arena, no drop needed
- ptr + len must form a valid UTF-8 string
- For global strings: capacity must match the original String’s capacity
Implementations§
Trait Implementations§
Source§impl Clone for SeqString
impl Clone for SeqString
Source§fn clone(&self) -> Self
fn clone(&self) -> Self
Clone always allocates from global allocator for Send safety
This ensures that when a String is sent through a channel, the receiving strand gets an independent copy that doesn’t depend on the sender’s arena.
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Eq for SeqString
impl Send for SeqString
Auto Trait Implementations§
impl Freeze for SeqString
impl RefUnwindSafe for SeqString
impl !Sync for SeqString
impl Unpin for SeqString
impl UnwindSafe for SeqString
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