impl Struct ...
adds some methods to Struct
. These methods aren’t available to other types or traits.
impl Trait for Struct ..
implements the trait Trait
for the struct Struct
. This results in the methods of the trait being available for Struct
.
So, even though these two syntaxes look similar, they do 2 completely different things.
impl Struct ...
adds new (not previously defined) methods to the type, while the other adds previously defined methods (from the trait) to the type.