The sealed trait pattern does not exist in Rust because the language lacks a native sealed keyword or mechanism to restrict trait implementations to a specific crate. You cannot prevent external code from implementing a trait defined in your library using standard Rust features. Instead, you must rely on documentation, design patterns like the typestate pattern, or use the unsafe keyword with extern blocks to enforce constraints manually, though these are not true sealed traits.
// Rust does not support sealed traits natively.
// There is no syntax like `trait MyTrait {}` that prevents external implementations.
// You must document the restriction or use alternative design patterns.