Skip to main content

BuiltinElementIds

Struct BuiltinElementIds 

Source
pub struct BuiltinElementIds {
Show 135 fields pub diagnostic_error: ElementId, pub diagnostic_warning: ElementId, pub diagnostic_info: ElementId, pub diagnostic_hint: ElementId, pub diff_add_sign: ElementId, pub diff_change_sign: ElementId, pub diff_remove_sign: ElementId, pub diff_conflict_sign: ElementId, pub diff_add_line: ElementId, pub diff_add_refine_bg: ElementId, pub diff_remove_refine_bg: ElementId, pub diff_change_line: ElementId, pub diff_remove_line: ElementId, pub diff_deletion_block: ElementId, pub sticky_context_background: ElementId, pub sticky_context_line_number: ElementId, pub sticky_context_active: ElementId, pub sticky_context_separator: ElementId, pub diff_conflict_line: ElementId, pub diff_add_text: ElementId, pub diff_remove_text: ElementId, pub magit_sha: ElementId, pub magit_branch_current: ElementId, pub magit_ref_decoration: ElementId, pub magit_rebase_verb: ElementId, pub magit_author: ElementId, pub help_key: ElementId, pub help_command: ElementId, pub help_action: ElementId, pub help_literal: ElementId, pub transient_title: ElementId, pub transient_group: ElementId, pub transient_key: ElementId, pub transient_key_inactive: ElementId, pub transient_description: ElementId, pub transient_value: ElementId, pub transient_border: ElementId, pub gutter_sign: ElementId, pub gutter_fold_open: ElementId, pub gutter_fold_closed: ElementId, pub gutter_fold_summary: ElementId, pub pane_status_active: ElementId, pub pane_status_inactive: ElementId, pub pane_separator: ElementId, pub pane_inactive_overlay: ElementId, pub modeline_active: ElementId, pub modeline_inactive: ElementId, pub modeline_mode: ElementId, pub modeline_path: ElementId, pub modeline_position: ElementId, pub modeline_lang: ElementId, pub modeline_mode_item: ElementId, pub editor_background: ElementId, pub editor_foreground: ElementId, pub editor_cursor: ElementId, pub ui_popup_background: ElementId, pub ui_popup_title: ElementId, pub ui_popup_hint: ElementId, pub file_tree_dir: ElementId, pub file_tree_hidden: ElementId, pub file_tree_file: ElementId, pub editor_cursor_line: ElementId, pub messages_timestamp: ElementId, pub messages_trace: ElementId, pub messages_debug: ElementId, pub messages_info: ElementId, pub messages_warn: ElementId, pub messages_error: ElementId, pub syntax_default: ElementId, pub syntax_comment: ElementId, pub syntax_line_comment: ElementId, pub syntax_string: ElementId, pub syntax_keyword: ElementId, pub syntax_type: ElementId, pub syntax_number: ElementId, pub syntax_function: ElementId, pub syntax_constant: ElementId, pub syntax_variable: ElementId, pub syntax_operator: ElementId, pub syntax_punctuation: ElementId, pub syntax_attribute: ElementId, pub syntax_heading_1: ElementId, pub syntax_heading_2: ElementId, pub syntax_heading_3: ElementId, pub syntax_heading_4: ElementId, pub syntax_heading_5: ElementId, pub syntax_heading_6: ElementId, pub syntax_bold: ElementId, pub syntax_italic: ElementId, pub syntax_link: ElementId, pub syntax_url: ElementId, pub syntax_markup_raw: ElementId, pub syntax_code_block: ElementId, pub syntax_markup: ElementId, pub whitespace: ElementId, pub whitespace_trailing: ElementId, pub indent_guide: ElementId, pub indent_guide_active: ElementId, pub search_match: ElementId, pub search_current: ElementId, pub selection: ElementId, pub doc_highlight_read: ElementId, pub doc_highlight_write: ElementId, pub doc_highlight_text: ElementId, pub substitute_preview: ElementId, pub inlay_hint: ElementId, pub completion_annotation_kind: ElementId, pub completion_annotation_doc: ElementId, pub completion_annotation_keybinding: ElementId, pub completion_annotation_source: ElementId, pub completion_annotation_custom: ElementId, pub completion_annotation_perm_type: ElementId, pub completion_annotation_perm_read: ElementId, pub completion_annotation_perm_write: ElementId, pub completion_annotation_perm_exec: ElementId, pub completion_annotation_perm_special: ElementId, pub completion_annotation_perm_none: ElementId, pub completion_annotation_size: ElementId, pub completion_annotation_mtime: ElementId, pub picker_root: ElementId, pub picker_title: ElementId, pub picker_prompt: ElementId, pub picker_count: ElementId, pub completion_annotation_location_path: ElementId, pub completion_annotation_location_line: ElementId, pub completion_annotation_location_col: ElementId, pub completion_annotation_status_dirty: ElementId, pub completion_annotation_status_active: ElementId, pub completion_annotation_latency_reflex: ElementId, pub completion_annotation_latency_display: ElementId, pub completion_annotation_latency_background: ElementId, pub completion_annotation_args: ElementId, pub completion_annotation_buffer_id: ElementId, pub completion_annotation_register: ElementId, pub terminal_ansi: [ElementId; 16],
}
Expand description

The interned ElementIds for the builtin elements the renderers read, captured once at boot from the ThemeRegistry and held for the process lifetime. Copy + small, so it snapshots into RenderState per publish for free; a read is then resolved.get(ids.<elem>) — an array index, no per-frame name lookup (design §7).

Grown one consumer-group at a time as Thread B migrates renderers off the flat Theme struct (T.4.a diagnostics → T.4.b diff → …).

Fields§

§diagnostic_error: ElementId§diagnostic_warning: ElementId§diagnostic_info: ElementId§diagnostic_hint: ElementId§diff_add_sign: ElementId§diff_change_sign: ElementId§diff_remove_sign: ElementId§diff_conflict_sign: ElementId§diff_add_line: ElementId§diff_add_refine_bg: ElementId

DR.2: intra-line refinement backgrounds — the sub-range of a changed line that actually differs.

§diff_remove_refine_bg: ElementId§diff_change_line: ElementId§diff_remove_line: ElementId

D-fix.3b: removed-line tint for the baseline/left pane.

§diff_deletion_block: ElementId§sticky_context_background: ElementId

TC.3b: the sticky context strip’s backdrop.

§sticky_context_line_number: ElementId

TC.11: the strip’s gutter line numbers.

§sticky_context_active: ElementId

TC.11: the strip’s innermost row — the scope the cursor is in.

§sticky_context_separator: ElementId

TC.12: the rule beneath the strip, when context.separator is set.

§diff_conflict_line: ElementId§diff_add_text: ElementId§diff_remove_text: ElementId§magit_sha: ElementId§magit_branch_current: ElementId§magit_ref_decoration: ElementId§magit_rebase_verb: ElementId§magit_author: ElementId§help_key: ElementId§help_command: ElementId§help_action: ElementId§help_literal: ElementId§transient_title: ElementId§transient_group: ElementId§transient_key: ElementId§transient_key_inactive: ElementId§transient_description: ElementId§transient_value: ElementId§transient_border: ElementId§gutter_sign: ElementId

SG.2b: the fallback tone for a sign whose named element is missing.

§gutter_fold_open: ElementId§gutter_fold_closed: ElementId§gutter_fold_summary: ElementId

The ⋯ N lines summary trailing a collapsed head row. Both peers read it, so the trailer cannot drift between them.

§pane_status_active: ElementId§pane_status_inactive: ElementId§pane_separator: ElementId§pane_inactive_overlay: ElementId§modeline_active: ElementId§modeline_inactive: ElementId§modeline_mode: ElementId§modeline_path: ElementId§modeline_position: ElementId§modeline_lang: ElementId§modeline_mode_item: ElementId§editor_background: ElementId§editor_foreground: ElementId§editor_cursor: ElementId§ui_popup_background: ElementId§ui_popup_title: ElementId§ui_popup_hint: ElementId§file_tree_dir: ElementId§file_tree_hidden: ElementId§file_tree_file: ElementId§editor_cursor_line: ElementId§messages_timestamp: ElementId§messages_trace: ElementId§messages_debug: ElementId§messages_info: ElementId§messages_warn: ElementId§messages_error: ElementId§syntax_default: ElementId§syntax_comment: ElementId§syntax_line_comment: ElementId§syntax_string: ElementId§syntax_keyword: ElementId§syntax_type: ElementId§syntax_number: ElementId§syntax_function: ElementId§syntax_constant: ElementId§syntax_variable: ElementId§syntax_operator: ElementId§syntax_punctuation: ElementId§syntax_attribute: ElementId§syntax_heading_1: ElementId§syntax_heading_2: ElementId§syntax_heading_3: ElementId§syntax_heading_4: ElementId§syntax_heading_5: ElementId§syntax_heading_6: ElementId§syntax_bold: ElementId§syntax_italic: ElementId§syntax_link: ElementId§syntax_url: ElementId§syntax_markup_raw: ElementId§syntax_code_block: ElementId

MC.1: full-width background tint for fenced/indented code blocks.

§syntax_markup: ElementId§whitespace: ElementId§whitespace_trailing: ElementId§indent_guide: ElementId

IG.2: indentation guides. Two ids so the block enclosing the cursor can be drawn against the rest.

§indent_guide_active: ElementId§search_match: ElementId§search_current: ElementId§selection: ElementId§doc_highlight_read: ElementId§doc_highlight_write: ElementId§doc_highlight_text: ElementId§substitute_preview: ElementId§inlay_hint: ElementId§completion_annotation_kind: ElementId§completion_annotation_doc: ElementId§completion_annotation_keybinding: ElementId§completion_annotation_source: ElementId§completion_annotation_custom: ElementId§completion_annotation_perm_type: ElementId§completion_annotation_perm_read: ElementId§completion_annotation_perm_write: ElementId§completion_annotation_perm_exec: ElementId§completion_annotation_perm_special: ElementId§completion_annotation_perm_none: ElementId§completion_annotation_size: ElementId§completion_annotation_mtime: ElementId§picker_root: ElementId§picker_title: ElementId§picker_prompt: ElementId§picker_count: ElementId§completion_annotation_location_path: ElementId§completion_annotation_location_line: ElementId§completion_annotation_location_col: ElementId§completion_annotation_status_dirty: ElementId§completion_annotation_status_active: ElementId§completion_annotation_latency_reflex: ElementId§completion_annotation_latency_display: ElementId§completion_annotation_latency_background: ElementId§completion_annotation_args: ElementId§completion_annotation_buffer_id: ElementId§completion_annotation_register: ElementId§terminal_ansi: [ElementId; 16]

Implementations§

Source§

impl BuiltinElementIds

Source

pub fn annotation_slot(&self, slot: &str) -> ElementId

MARG §8: map an [Annotation::Styled] segment’s slot KEY to its interned element id, shared by both renderer peers so a styled marginalia cell resolves identically. Unknown slots fall back to completion.annotation.custom (the plugin-annotation default) — a paint-time styleless-ish read, never a panic. Adding a new builtin slot is one arm here plus the field/registration; plugin slots resolve dynamically once the WASM host lands (design §7).

[Annotation::Styled]: lattice-completion’s Annotation::Styled

Source

pub fn capture(reg: &dyn ThemeRegistry) -> Self

Intern the builtin ids from the registry once at boot. A missing builtin (a registration bug, never expected) logs once and falls back to ElementId::INVALID — a styleless read, never a panic (graceful degradation, paramount-goal-aligned).

Trait Implementations§

Source§

impl Clone for BuiltinElementIds

Source§

fn clone(&self) -> BuiltinElementIds

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for BuiltinElementIds

Source§

impl Debug for BuiltinElementIds

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for BuiltinElementIds

Source§

fn default() -> Self

All ElementId::INVALID — the placeholder a default RenderState carries before the boot capture. Reads against an empty/default resolved table return Style::empty().

Source§

impl Eq for BuiltinElementIds

Source§

impl PartialEq for BuiltinElementIds

Source§

fn eq(&self, other: &BuiltinElementIds) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for BuiltinElementIds

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more