Skip to content

Commit

Permalink
docs(lib): use references to crate types
Browse files Browse the repository at this point in the history
  • Loading branch information
orhun committed Mar 14, 2024
1 parent 9f9de02 commit e0f4f57
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ cargo add ratatui ratatui-splash-screen

#### Usage

Create a `SplashConfig` and construct a `SplashScreen` widget with it.
Then render the widget in a loop using the `render_widget` function.
You can check if the splash screen is done rendering by calling `is_rendered`.
Create a [`SplashConfig`] and construct a [`SplashScreen`] widget with it.
Then render the widget in a loop using the [`render`] function.
You can check if the splash screen is done rendering by calling [`is_rendered`].

#### Examples

Expand Down Expand Up @@ -67,14 +67,19 @@ See the full example [here](https://github.com/orhun/ratatui-splash-screen/blob/
#### Tips

- Use small images (such as 200x200) for a better experience.
- You can tweak the `render_steps` value for smoother rendering.
- You can tweak the [`render_steps`] value for smoother rendering.
- Run [`sha256sum(1)`] command on your system to find out the SHA value. You can set it to `None` if you don't want to check integrity.

[ratatui-splash-screen]: https://github.com/orhun/ratatui-splash-screen
[ratatui]: https://ratatui.rs
[rust-embed]: https://github.com/pyrossh/rust-embed
[`sha256sum(1)`]: https://linux.die.net/man/1/sha256sum
[gpg-tui]: https://github.com/orhun/gpg-tui
[`SplashConfig`]: https://docs.rs/ratatui-splash-screen/latest/ratatui_splash_screen/config/struct.SplashConfig.html
[`SplashScreen`]: https://docs.rs/ratatui-splash-screen/latest/ratatui_splash_screen/splash_screen/struct.SplashScreen.html
[`is_rendered`]: https://docs.rs/ratatui-splash-screen/latest/ratatui_splash_screen/splash_screen/struct.SplashScreen.html#method.is_rendered
[`render_steps`]: https://docs.rs/ratatui-splash-screen/latest/ratatui_splash_screen/config/struct.SplashConfig.html#structfield.render_steps
[`render`]: https://docs.rs/ratatui/latest/ratatui/widgets/trait.Widget.html#tymethod.render

<!-- cargo-rdme end -->

Expand Down
14 changes: 10 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
//!
//! ## Usage
//!
//! Create a `SplashConfig` and construct a `SplashScreen` widget with it.
//! Then render the widget in a loop using the `render_widget` function.
//! You can check if the splash screen is done rendering by calling `is_rendered`.
//! Create a [`SplashConfig`] and construct a [`SplashScreen`] widget with it.
//! Then render the widget in a loop using the [`render`] function.
//! You can check if the splash screen is done rendering by calling [`is_rendered`].
//!
//! ## Examples
//!
Expand Down Expand Up @@ -63,14 +63,20 @@
//! ## Tips
//!
//! - Use small images (such as 200x200) for a better experience.
//! - You can tweak the `render_steps` value for smoother rendering.
//! - You can tweak the [`render_steps`] value for smoother rendering.
//! - Run [`sha256sum(1)`] command on your system to find out the SHA value. You can set it to `None` if you don't want to check integrity.
//!
//! [ratatui-splash-screen]: https://github.com/orhun/ratatui-splash-screen
//! [ratatui]: https://ratatui.rs
//! [rust-embed]: https://github.com/pyrossh/rust-embed
//! [`sha256sum(1)`]: https://linux.die.net/man/1/sha256sum
//! [gpg-tui]: https://github.com/orhun/gpg-tui
//!
//! [`SplashConfig`]: crate::config::SplashConfig
//! [`SplashScreen`]: crate::splash_screen::SplashScreen
//! [`is_rendered`]: crate::splash_screen::SplashScreen::is_rendered
//! [`render_steps`]: crate::config::SplashConfig#structfield.render_steps
//! [`render`]: https://docs.rs/ratatui/latest/ratatui/widgets/trait.Widget.html#tymethod.render

pub(crate) mod assets;
mod config;
Expand Down

0 comments on commit e0f4f57

Please sign in to comment.