Documentation for `BridgesConfigBuilder` (and likely other autogenerated builder accessors) is confusing in the presence of #[cfg]
The bridges()
(and friends) accessors on BridgesConfigBuilder
are only compiled in when feature bridge-client
is enabled.
But, because they're autogenerated using a macro, docs.rs does not display any conditional compilation/features warning, and trying to use the feature just results in the minorly infuriating error message
error[E0599]: no method named `bridges` found for mutable reference `&mut BridgesConfigBuilder` in the current scope
--> crates/onionmasq-mobile/src/lib.rs:200:38
|
200 | config.bridges().bridges().push(bcb);
| ^^^^^^^ private field, not a method
For more information about this error, try `rustc --explain E0599`.
This seems like an oversight.