iced-rs / iced

A cross-platform GUI library for Rust, inspired by Elm

Home Page:https://iced.rs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update the documents

rawhuul opened this issue · comments

Is your issue REALLY a bug?

  • My issue is indeed a bug!
  • I am not crazy! I will not fill out this form just to ask a question or request a feature. Pinky promise.

Is there an existing issue for this?

  • I have searched the existing issues.

Is this issue related to iced?

  • My hardware is compatible and my graphics drivers are up-to-date.

What happened?

The doc.rs page shows their is Component trait in iced::widget module, however it is not present in module and even getting docs from cargo doc --open, doesn't show the trait.

My Cargo.toml is:

[package]
name = "abc"
version = "0.1.0"
edition = "2021"

[dependencies]
iced = { version = "0.12.1", features = ["tokio", "advanced"] }
tokio = { version = "1.38.1", features = ["full"] }

What is the expected behavior?

Is Container trait deprecated? If not, in which module it is located?

Version

crates.io release

Operating System

Windows

Do you have any log output?

No response

The Component trait is behind the Cargo feature lazy, which is why it's not in your local cargo doc-generated documentation. It appears on crates.io because crates.io is configured specially to show documentation for all features.

It also confused me a bit when I first used Component, so it might be good to update that docs. I'm not sure why docs.rs doesn't put a lazy badge next to that trait. It's possible it's because the feature gate is actually located in the child package iced-widget.

Fixed by #2289.