Docs.rs
moire-source-context-1.0.0
moire-source-context 1.0.0
Docs.rs crate page
MIT
OR
Apache-2.0
Links
crates.io
Source
Owners
fasterthanlime
Dependencies
arborium ^2
normal
moire-types ^1.0.0
normal
datatest-mini ^0.2.0
dev
insta ^1
dev
Versions
80%
of the crate is documented
Platform
x86_64-unknown-linux-gnu
Feature flags
docs.rs
About docs.rs
Badges
Builds
Metadata
Shorthand URLs
Download
Rustdoc JSON
Build queue
Privacy policy
Rust
Rust website
The Book
Standard Library API Reference
Rust by Example
The Cargo Guide
Clippy Documentation
Skip to main content
Crate moire_source_context
moire_
source_
context
1.0.0
All Items
Crate Items
Structs
Functions
Crate
moire_
source_
context
Copy item path
Source
Structs
§
CutResult
Functions
§
cut_
source
Given source content, a language name, and a target position, find the containing scope, classify its children into keep/cut, and return the modified source with
/* ... */
placeholders for cut regions.
cut_
source_
compact
Aggressive context cutter for compact/collapsed displays.
extract_
enclosing_
fn
Extract the collapsed enclosing-function context for compact display.
extract_
target_
statement
Extract a compact, context-aware statement snippet around the target position.
highlighted_
context_
lines
Convert a
CutResult
into context lines with arborium syntax-highlighted HTML content.
text_
context_
lines
Convert a
CutResult
into context lines with plain text content (no highlighting).