Combined from primary sources listed below.
See primary docmentation in context for method mixin.
method mixin($obj, *@roles, :$needs-mixin-attribute)
Generates a new mixin type by calling generate_mixin with $obj and @roles. If $obj is composed, the mixin cache of $obj will be checked for any existing mixin for these beforehand. If $obj is an instance of a type, this will return $obj reblessed with the mixin generated, otherwise this will return the mixin itself.
If $needs-mixin-attribute is True, this will throw an exception if no mixin attribute exists on the mixin generated before returning.
See primary docmentation in context for method mixin.
method mixin_attribute($obj)
Returns the mixin attribute for $obj set with set_mixin_attribute.