pub trait AsyncGutterDecorationSource:
Send
+ Sync
+ Debug {
// Required methods
fn source_id(&self) -> u64;
fn produce(
&self,
buffer_id: u64,
path: Option<PathBuf>,
line_count: u32,
) -> DecorationFuture<'_>;
}Expand description
An async, off-render-path producer of a buffer’s gutter decorations.
The renderer NEVER calls this. The host’s per-tick decoration pump drives it
on a trigger, writes the result into the per-buffer cache, and the renderer
merges the cached marks into the same gutter partition it walks for
Mode::gutter_decorations.
Required Methods§
Sourcefn source_id(&self) -> u64
fn source_id(&self) -> u64
Stable id of the producing plugin — the teardown key
(GutterDecorationSourceRegistry::unregister). Two producers with the
same id are the same plugin (reload replaces rather than duplicates).
Sourcefn produce(
&self,
buffer_id: u64,
path: Option<PathBuf>,
line_count: u32,
) -> DecorationFuture<'_>
fn produce( &self, buffer_id: u64, path: Option<PathBuf>, line_count: u32, ) -> DecorationFuture<'_>
Produce this buffer’s gutter decorations off the render path. path is
the buffer’s on-disk path when it has one (a provider may key marks off
it); line_count bounds the addressable lines. See DecorationFuture
for the Ok/Err contract.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".