Traits now have a type attribute which returns a Duck type that can be used to validate that an object exposes an interface compatible with the trait.