pub trait ErnComponent {
type NextState;
// Required method
fn prefix() -> &'static str;
}Expand description
Represents a component of an Entity Resource Name (ERN).
This trait is used to ensure type safety and proper ordering when building ERNs. Each component in an ERN implements this trait, defining its prefix and the type of the next component that should follow it in the ERN structure.
The trait is primarily used by the ErnBuilder to enforce the correct order
of components during ERN construction.
Required Associated Types§
Sourcetype NextState
type NextState
The type of the next component that should follow this one in the ERN structure.
This associated type is used by the builder pattern to enforce the correct
sequence of components. For example, Domain::NextState is Category,
indicating that a Category should follow a Domain in an ERN.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
Source§impl ErnComponent for Account
impl ErnComponent for Account
type NextState = EntityRoot
Source§impl ErnComponent for EntityRoot
impl ErnComponent for EntityRoot
Source§impl ErnComponent for Parts
Implementation for the Parts component of an ERN.
impl ErnComponent for Parts
Implementation for the Parts component of an ERN.
The Parts component represents a collection of path parts in the ERN.
Its NextState is itself, allowing for multiple parts to be added.