I have the following struct:
pub struct S {
/// Not [`S::b`]
pub a: u32,
/// Not [`S::a`]
pub b: u32,
}
As I expected, these documentation links point to the fields. However, when I add getter methods for those two fields, like so:
impl S {
fn a(&self) -> u32 { self.a }
fn b(&self) -> u32 { self.b }
}
Now the links from the struct fields point at these methods instead, which is undesirable. I can disambiguate to say that I specifically want the method by linking to S::a()
, but I want the opposite disambiguation, which I can't find documentation on how to do. How do I disambiguate this link to point at the struct field?