When I look at File\'s docs, I see that the take
method takes a self
, not a &self
. But I\'m still able to call the method on a bor
The take
method comes from the Read
trait. That trait is implemented on File
, so there is a method File::take(self, u64) -> Take<Self>
, but the trait is also implemented on &File
(the impl is even listed on the very page you link to). For that impl, the Self
type is &File
, so its take
method takes a reference.