Expand description
The records of wit/plugin.wit’s types interface. They are generated
from the WIT itself by [crate::bindings], so the contract has one
definition of each record and nothing to keep in step: a plugin receives
and returns exactly these, natively and in a component.
This module adds only what the WIT cannot say: ROOT, the id that names
the file rather than a region, and the impls below.
Structs§
- Annotation
- Deferred presentation content for an existing region. This cannot change topology, alignment, fold identity, or collapsed state.
- Cut
- File
Entry - One changed file, as its manifest entry describes it.
filesays which sides the file has and names each;statussays how the two relate, which having both sides does not answer: a path that changed isrenamed, an object kind that changedtype-changed. - FileRef
- One side of a git delta, as the manifest names it.
- Leaf
- Position
- 0-based line, and 0-based byte column in the UTF-8 text.
- Query
Source - A named query source. diffr compiles all enabled sources per language. Names identify sources for imports and diagnostics; shared names must have identical text. Relative imports resolve against this name.
- Range
- Half-open.
- Region
- One region of a side’s tree.
- Source
- One side of a diffed file.
regionslists the tree in preorder: a fold comes before its children, and siblings keep their order. A binary file’s sides have empty text and no regions. - Span
- Bytes painted as changed on one line.
- Visibility
- How a region starts out: collapsed or open, and the label shown while it is collapsed (empty for none).
Enums§
- File
Sides - The sides a changed file has. A deletion is
left-only, an additionright-only. - File
Status - Git’s delta status.
- Kind
- A leaf tiles the file; a fold’s range is the hull of its children.
- Move
- What a plugin asks for. A region is named by its id, or the file by
0 where a move allows it. Moves are carried out in order, and the next
plugin sees the result; a move that cannot be carried out aborts the
run with
mutation_failed. - Side
- The before (
lhs) or after (rhs) side of a comparison. - Source
Sides - The sides a diffed file has, the same sides as its entry’s
file.
Constants§
- ROOT
- The id that names the file itself rather than a region.