Skip to main content

EntityCategory

Trait EntityCategory 

Source
pub trait EntityCategory:
    Copy
    + Clone
    + Eq
    + PartialEq
    + Hash
    + Debug
    + Send
    + Sync
    + 'static {
    // Required methods
    fn as_str(&self) -> &'static str;
    fn dir(&self) -> &str;
    fn summary_prefix(&self) -> &str;
    fn to_generic(&self) -> Option<GenericCategory>;
}
Expand description

Typed entity category owned by each contract family.

Family parsers define a concrete enum or newtype implementing this trait. Renderers use EntityCategory::to_generic to apply cross-family formatting rules via GenericCategory.

Required Methods§

Source

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

Wire-safe category slug (e.g. "schemas", "operations").

Source

fn dir(&self) -> &str

Output directory segment for entities of this category.

Source

fn summary_prefix(&self) -> &str

Prefix used when generating SUMMARY entries for this category.

Source

fn to_generic(&self) -> Option<GenericCategory>

Maps this family-specific category to a renderer-known generic bucket, if any.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§