pub trait RoleId:
Copy
+ Eq
+ Hash
+ Debug
+ Send
+ Sync
+ 'static {
type Label: LabelId;
// Required method
fn role_name(&self) -> RoleName;
// Provided method
fn role_index(&self) -> Option<u32> { ... }
}Expand description
Trait for role identifiers in choreographies
Roles are typically generated as enums per choreography, but any type implementing the required traits can serve as a role identifier.
Required Associated Types§
Required Methods§
Provided Methods§
Sourcefn role_index(&self) -> Option<u32>
fn role_index(&self) -> Option<u32>
Optional index for parameterized roles.
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.