I was reading through the code for HuggingFace's candle crate and found two methods whose definitions I couldn't find. The first is .has_func and the second is .get_func.
How can I find the definitions of these methods?
Here's what I have tried:
It raised a more general question in my mind, I wanted to enumerate all the places a method could come from for a struct defined in a given crate, here's what I can think of:
The best way to find the definition of something is to put it in rust-analyzer. It can almost always do that.
In this case, it seems to come from cudarc::driver::safe::CudaDevice
, which the type Deref
s to.