pub trait BunSelectorImpl: SelectorImpl<AttrValue = CSSString, Identifier = Ident, LocalIdentifier = IdentOrRef, LocalName = Ident, NamespaceUrl = &'static [u8], NamespacePrefix = Ident, NonTSPseudoClass = PseudoClass, PseudoElement = PseudoElement, VendorPrefix = VendorPrefix> { }Expand description
Constrained SelectorImpl with the concrete assoc-type bundle Bun uses.
PORT NOTE: in Zig the parse_* functions were comptime Impl: type generics
but every body assumed the concrete selector.impl.Selectors shapes (it was
the only instantiation). Rust can’t see through the open Impl::LocalName
to Ident, so the parse functions bound on this sub-trait instead — the
associated-type equality clauses make Impl::LocalName == Ident etc.
visible to the body without monomorphizing the signature.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".