So defining a trait is nothing new:
trait Foo {
fn foo() {
// omitted
}
}
However this confuses me:
impl Foo {
fn some_other_foo() {
// omitted
}
}
Other than w.r.t. object safety (which isn't illustrated here, but is one place where I can see the usefulness), why are impl Trait
items even allowed?
Or, to paraphrase, what does it allow for that a default fn in the trait item itself does not?