Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ynqa committed Mar 13, 2024
1 parent 1e9228b commit adf10ab
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
4 changes: 1 addition & 3 deletions src/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,9 @@ use crate::{
/// Provides functionality for executing terminal commands
/// and managing terminal state.
///
/// The `Engine` struct encapsulates methods for interacting
/// The `Engine` struct provides methods for interacting
/// with the terminal, such as moving the cursor,
/// clearing the screen, writing text, and more.
/// It leverages the `crossterm` crate to provide cross-platform
/// terminal operations.
#[derive(Clone)]
pub struct Engine<W: Write> {
out: W,
Expand Down
19 changes: 10 additions & 9 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,20 @@ use thiserror::Error;

use crate::serde_json;

/// Represents all possible errors that can occur in the application.
/// Represents all possible errors that can occur within the application.
///
/// This enum encapsulates different types of errors by leveraging the `thiserror` crate
/// for easy error handling and propagation. The errors include IO errors, serde json errors,
/// interruption errors, and evaluator phase errors.
/// This enum categorizes various types of errors by leveraging the `thiserror` crate
/// for efficient error handling and propagation.
///
/// # Variants
///
/// - `IO`: Wraps `std::io::Error`. Occurs during input/output operations.
/// - `SerdeJson`: Wraps `serde_json::Error`.
/// Occurs during serialization or deserialization with serde_json.
/// - `Interrupted`: Represents an error where an operation was interrupted.
/// Contains a message describing the interruption.
/// - `IO`: Represents `std::io::Error`. Arises during input/output operations.
/// - `SerdeJson`: Represents `serde_json::Error`.
/// Arises during serialization or deserialization processes with serde_json.
/// - `Interrupted`: Indicates an operation was prematurely interrupted.
/// Contains a message detailing the interruption.
/// - `DowncastError`: Indicates a failure in type downcasting.
/// Contains a message detailing the failure.
#[derive(Error, Debug)]
pub enum Error {
#[error(transparent)]
Expand Down
2 changes: 1 addition & 1 deletion src/pane.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pub struct Pane {
/// This value determines the starting point for grapheme extraction, allowing for scrolling behavior.
offset: usize,
/// An optional fixed height for the pane. If set, this limits the number of graphemes extracted.
/// When specified, this restricts the maximum number of graphemes to be displayed, effectively setting the pane's height.
/// When specified, this restricts the maximum number of graphemes to be displayed.
fixed_height: Option<usize>,
}

Expand Down

0 comments on commit adf10ab

Please sign in to comment.