Skip to content

Commit

Permalink
fix: docs
Browse files Browse the repository at this point in the history
  • Loading branch information
veeso committed Oct 13, 2024
1 parent 4a67999 commit 6a5f407
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 11 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

- [Changelog](#changelog)
- [2.0.1](#201)
- [2.0.0](#200)
- [1.9.2](#192)
- [1.9.1](#191)
Expand Down Expand Up @@ -36,6 +37,12 @@

---

## 2.0.1

Released on 13/10/2024

- Fixed docs not building

## 2.0.0

Released on 13/10/2024
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tuirealm"
version = "2.0.0"
version = "2.0.1"
authors = ["Christian Visintin"]
edition = "2021"
categories = ["command-line-utilities"]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</p>

<p align="center">Developed by <a href="https://veeso.github.io/" target="_blank">@veeso</a></p>
<p align="center">Current version: 2.0.0 (13/10/2024)</p>
<p align="center">Current version: 2.0.1 (13/10/2024)</p>

<p align="center">
<a href="https://opensource.org/licenses/MIT"
Expand Down
6 changes: 3 additions & 3 deletions src/core/application.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,13 +355,13 @@ where
}
}

/// Poll strategy defines how to call [`Application::poll`] on the event listener.
/// Poll strategy defines how to call `Application::poll` on the event listener.
pub enum PollStrategy {
/// [`Application::poll`] function will be called once
/// `Application::poll` function will be called once
Once,
/// The application will keep waiting for events for the provided duration
TryFor(Duration),
/// [`Application::poll`] function will be called up to `n` times, until it will return [`Option::None`].
/// `Application::poll` function will be called up to `n` times, until it will return [`Option::None`].
UpTo(usize),
}

Expand Down
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![cfg_attr(docsrs, feature(doc_cfg))]

//! # tui-realm
//!
//! tui-realm is a **framework** for **[ratatui](https://github.com/ratatui-org/ratatui)**
Expand Down
2 changes: 1 addition & 1 deletion src/listener/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use super::{Duration, EventListener, Poll, Port};

/// The event listener configurator is used to setup an event listener.
/// Once you're done with configuration just call [`EventListenerCfg::start`] and the event listener will start and the listener
/// Once you're done with configuration just call `EventListenerCfg::start` and the event listener will start and the listener
/// will be returned.
pub struct EventListenerCfg<U>
where
Expand Down
4 changes: 2 additions & 2 deletions src/listener/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use worker::EventListenerWorker;
// -- internal
use super::Event;

/// Result returned by [`EventListener`]. Ok value depends on the method, while the
/// Result returned by `EventListener`. [`Ok`] value depends on the method, while the
/// Err value is always [`ListenerError`].
pub type ListenerResult<T> = Result<T, ListenerError>;

Expand All @@ -48,7 +48,7 @@ where
/// This function mustn't be blocking, and will be called within the configured interval of the event listener.
/// It may return Error in case something went wrong.
/// If it was possible to poll for event, `Ok` must be returned.
/// If an event was read, then `Some()` must be returned., otherwise `None`.
/// If an event was read, then [`Some`] must be returned, otherwise [`None`].
/// The event must be converted to `Event` using the `adapters`.
fn poll(&mut self) -> ListenerResult<Option<Event<UserEvent>>>;
}
Expand Down
6 changes: 3 additions & 3 deletions src/terminal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pub enum TerminalError {
CannotToggleMouseCapture,
}

/// An helper around [`Terminal`] to quickly setup and perform on terminal.
/// An helper around [`crate::ratatui::Terminal`] to quickly setup and perform on terminal.
/// You can opt whether to use or not this structure to interact with the terminal
/// Anyway this structure is 100% cross-backend compatible and is really easy to use, so I suggest you to use it.
/// If you need more advance terminal command, you can get a reference to it using the `raw()` and `raw_mut()` methods.
Expand Down Expand Up @@ -202,14 +202,14 @@ impl TerminalBridge<adapter::CrosstermTerminalAdapter> {
Self::init(adapter::CrosstermTerminalAdapter::new()?)
}

/// Returns a reference to the underlying [`Terminal`]
/// Returns a reference to the underlying [`crate::ratatui::Terminal`]
pub fn raw(
&self,
) -> &crate::ratatui::Terminal<crate::ratatui::backend::CrosstermBackend<std::io::Stdout>> {
self.terminal.raw()
}

/// Returns a mutable reference the underlying [`Terminal`]
/// Returns a mutable reference the underlying [`crate::ratatui::Terminal`]
pub fn raw_mut(
&mut self,
) -> &mut crate::ratatui::Terminal<crate::ratatui::backend::CrosstermBackend<std::io::Stdout>>
Expand Down

0 comments on commit 6a5f407

Please sign in to comment.