• François Laignel's avatar
    Bus::get_pollfd generate doc for both unix & windows · cd56d603
    François Laignel authored
    There are different implementations and signatures for `get_pollfd` depending
    on whether the target platform is unix or windows. When generating the doc,
    we need both implementations to appear regardless of the target platform. This
    commit is inspired by the way Rust `std` library deals with `process::Command`
    OS dependent variants
    Documentation can't be accurate though as we can't use the`std::os::windows`
    on `unix` and vice versa. As a workaround a fake fd class matching the other
    platform is declared.
    This could be further enhanced once `#[doc(cfg(...))]` is stabilized
    (https://github.com/rust-lang/rust/issues/43781) by declaring `#[doc(cfg(unix))]`
    or `#[doc(cfg(windows))]` instead of the hard coded comments `This is supported
    on **Windows/Unix** only`. Unfortunately, these comments disappear when
    generating will `--all-features` because they are not part of the documentation
    in the gir file.
Last commit
Last update
src Loading commit data...
CHANGELOG.md Loading commit data...
Cargo.toml Loading commit data...
LICENSE-APACHE Loading commit data...
LICENSE-MIT Loading commit data...
README.md Loading commit data...
build.rs Loading commit data...