pub trait Lit: Sized + Sealed {
    const SELF: Self;
    const NAME: &'static RefStr;

    fn from_component(c: &Component<'_>) -> Option<Self> { ... }
}
Expand description

A literal RefStr.

Types implementing Lit must be name::Components, and provide a conversion from a component iff the component’s RefStr representation is equal to Lit::NAME. Because these morphisms can only be guaranteed axiomatically, the trait can not currently be implemented by types outside of this crate.

Lit types are useful for efficiently creating known-valid Qualified refs, and sometimes for pattern matching.

Required Associated Constants

Provided Methods

Implementors