Skip to main content

Semantic

Enum Semantic 

Source
pub enum Semantic {
Show 16 variants Keyword, Symbol, KeywordArg, String, Number, Literal, Comment, Accent, Muted, Error, Warning, Info, Hint, Added, Removed, Unchanged,
}

Variants§

§

Keyword

Language keywords — defcaixa, defteia, let, lambda, etc.

§

Symbol

Non-keyword symbols — identifiers, function names, variant names.

§

KeywordArg

:keyword-positioned atoms.

§

String

"string literals".

§

Number

42, 3.14.

§

Literal

#t, #f, nil.

§

Comment

; comments.

§

Accent

Primary accent — useful for highlights, carets, focused tokens.

§

Muted

Dim text — metadata, line numbers, help text.

§

Error

§

Warning

§

Info

§

Hint

§

Added

§

Removed

§

Unchanged

Implementations§

Source§

impl Semantic

Source

pub const fn is_keyword(&self) -> bool

Source

pub const fn is_symbol(&self) -> bool

Source

pub const fn is_keyword_arg(&self) -> bool

Source

pub const fn is_string(&self) -> bool

Source

pub const fn is_number(&self) -> bool

Source

pub const fn is_literal(&self) -> bool

Source

pub const fn is_comment(&self) -> bool

Source

pub const fn is_accent(&self) -> bool

Source

pub const fn is_muted(&self) -> bool

Source

pub const fn is_error(&self) -> bool

Source

pub const fn is_warning(&self) -> bool

Source

pub const fn is_info(&self) -> bool

Source

pub const fn is_hint(&self) -> bool

Source

pub const fn is_added(&self) -> bool

Source

pub const fn is_removed(&self) -> bool

Source

pub const fn is_unchanged(&self) -> bool

Source§

impl Semantic

Source

pub const ALL: &'static [Self]

Every variant of Semantic in declaration order.

The single canonical arm-list every substrate consumer that has to walk the closed 15-arm semantic-style partition (the two theme overlays’ exhaustive-match resolver functions blackmatter_dark_color / blackmatter_light_color in crate::blackmatter, the future LSP-side per-Semantic SemanticTokenType dispatch at caixa-lsp/src/main.rs, a future feira lint --list-styles operator-facing enumeration verb) reads for. Peer of the sibling closed-set fieldless typed enums’ ALL slices already carried by [caixa_core::CaixaKind] / [caixa_core::supervisor::RestartStrategy] / [caixa_core::supervisor::RestartPolicy] / [caixa_core::aplicacao::PlacementStrategy] / [caixa_core::upgrade::UpgradeInstruction] / caixa_lint::diagnostic::Severity / caixa_lint::diagnostic::FixSafety / caixa_arch::InvariantKind / caixa_arch::ArchVerdict / caixa_provedor::FerriteRuntime closed-set typed-enum discriminator axes.

Source

pub const fn as_str(self) -> &'static str

Canonical kebab-case discriminator scalar for this variant — the single substrate-primitive &'static str projection every downstream consumer of the closed 16-arm Semantic partition (a future LSP-side per-Semantic SemanticTokenType name-mapping dispatch at caixa-lsp/src/main.rs, a future feira lint --list-styles operator-facing enumeration verb, a future caixa.nvim per-Semantic highlight-group name resolver that reaches for a stable kebab identifier per arm, a future blackmatter-shell per-arm classname the terminal emitter composes into a data-semantic="<kebab>" attribute) reaches through. Kebab-case matches the peer gen_platform::IsVariant-derived kebab discriminant convention the sibling closed-set typed enums ([caixa_core::CaixaKind::as_str], [caixa_core::supervisor::RestartStrategy::as_str], [caixa_core::supervisor::RestartPolicy::as_str], [caixa_core::aplicacao::PlacementStrategy::as_str], [caixa_core::upgrade::UpgradeInstruction::as_str], caixa_lint::diagnostic::Severity::as_str, caixa_lint::diagnostic::FixSafety::as_str, caixa_arch::InvariantKind::as_str, caixa_arch::ArchVerdict::as_str, caixa_provedor::FerriteRuntime::variant_slug) already emit on their canonical &'static str projection axis.

The 16 arms return the kebab-case forms of their PascalCase variant names (Keyword"keyword", KeywordArg"keyword-arg", Unchanged"unchanged", etc.), matching the peer closed-set typed-enum canonical byte-string conventions.

Peer of the std::fmt::Display and AsRef<str> impls on this enum, which both route through this accessor so format!("{s}"), s.as_str(), and <Semantic as AsRef<str>>::as_ref(&s) resolve to the same per-arm byte-string.

Trait Implementations§

Source§

impl AsRef<str> for Semantic

Substrate-canonical AsRef<str> projection on the caixa-theme Semantic closed-set fieldless typed enum — routes through the same Semantic::as_str pub const fn scalar accessor the paired std::fmt::Display impl already reaches for.

Peer of the sibling AsRef<str> impls the substrate carries on [caixa_core::CaixaKind], [caixa_core::CaixaVersion], [caixa_core::CaixaDialeto], [caixa_core::dep::DepList], [caixa_core::supervisor::RestartStrategy], [caixa_core::supervisor::RestartPolicy], [caixa_core::aplicacao::PlacementStrategy], [caixa_core::aplicacao::RateLimitUnit], caixa_lint::diagnostic::Severity, caixa_arch::InvariantKind, caixa_arch::ArchVerdict, caixa_provedor::FerriteRuntime — extends the substrate-wide (as_str, AsRef<str>, Display) canonical-projection triple onto the caixa-theme closed-set typed-enum axis, so a future consumer bound through the trait-idiomatic .as_ref() (a HashMap::get::<str>(sem.as_ref()) per-Semantic style-lookup, a future caixa-lsp SemanticTokenType::new(sem.as_ref()) registration site, any impl AsRef<str>-bound generic function) reaches the same kebab byte-string Semantic::as_str returns rather than an open-coded .as_str() projection at every wire-up.

Source§

fn as_ref(&self) -> &str

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Clone for Semantic

Source§

fn clone(&self) -> Semantic

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 Semantic

Source§

impl Debug for Semantic

Source§

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

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

impl<'de> Deserialize<'de> for Semantic

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for Semantic

std::fmt::Display routed through Semantic::as_str, so the pretty-printed byte-string every consumer that formats the semantic style as user-facing text lands on (a future feira lint --list-styles operator-facing enumeration verb’s per-arm line, a future caixa-lsp diagnostic-source line naming the offending semantic, a future caixa.nvim per-Semantic highlight-group name emitter, a tracing::field::display(&sem) structured-log recorder on the paint-side emit path) reaches for the same lifted kebab-case per-arm byte-string Semantic::as_str returns.

Peer of the sibling std::fmt::Display impls on the closed-set typed enums the substrate carries — [caixa_core::CaixaKind], [caixa_core::supervisor::RestartStrategy], [caixa_core::supervisor::RestartPolicy], [caixa_core::aplicacao::PlacementStrategy], [caixa_core::upgrade::UpgradeInstruction], caixa_lint::diagnostic::Severity, caixa_lint::diagnostic::FixSafety, caixa_arch::InvariantKind, caixa_arch::ArchVerdict, caixa_provedor::FerriteRuntime — extended to the second-to-last un-lifted caixa-theme closed-set fieldless typed enum on the substrate-wide (as_str, AsRef<str>, Display) canonical-projection triple ratchet the prior lifts converged onto.

Source§

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

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

impl Eq for Semantic

Source§

impl Hash for Semantic

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for Semantic

Source§

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

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

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

Inequality operator !=. Read more
Source§

impl Serialize for Semantic

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Semantic

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.