pub struct StaticSource { /* private fields */ }Expand description
In-memory participant source — an owned Rope cloned on
every Self::snapshot.
Cheap: Rope::clone is an Arc-share of the underlying
chunks, not a deep copy. Used as the default smoke-test
baseline and as the substrate consumers (e.g. an LSP server
returning WorkspaceEdit previews, the AI multi-file
openDiff flow) wrap when they already hold the source
text in memory.
Implementations§
Source§impl StaticSource
impl StaticSource
Trait Implementations§
Source§impl Clone for StaticSource
impl Clone for StaticSource
Source§fn clone(&self) -> StaticSource
fn clone(&self) -> StaticSource
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StaticSource
impl Debug for StaticSource
Source§impl DiffParticipantSource for StaticSource
impl DiffParticipantSource for StaticSource
Auto Trait Implementations§
impl Freeze for StaticSource
impl RefUnwindSafe for StaticSource
impl Send for StaticSource
impl Sync for StaticSource
impl Unpin for StaticSource
impl UnsafeUnpin for StaticSource
impl UnwindSafe for StaticSource
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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> ⓘ
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 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> ⓘ
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