Raxol.Terminal.Buffer.SafeManager (Raxol v2.0.1)
View SourceSafe buffer manager that handles buffer operations with error recovery.
This module provides a safe interface to buffer operations, ensuring that failures don't crash the system and providing fallback behavior.
Summary
Functions
Safely clears the buffer.
Safely gets a cell from the buffer.
Gets buffer info safely.
Safely reads from the buffer.
Safely resizes the buffer.
Safely scrolls the buffer.
Safely sets a cell in the buffer.
Starts a safe manager process.
Safely writes data to the buffer.
Functions
Safely clears the buffer.
@spec get_cell(pid() | atom(), non_neg_integer(), non_neg_integer()) :: {:ok, map()} | {:error, term()}
Safely gets a cell from the buffer.
Gets buffer info safely.
@spec read(pid() | atom(), non_neg_integer()) :: {:ok, binary()} | {:error, term()}
Safely reads from the buffer.
@spec resize(pid() | atom(), non_neg_integer(), non_neg_integer()) :: :ok | {:error, term()}
Safely resizes the buffer.
Safely scrolls the buffer.
@spec set_cell(pid() | atom(), non_neg_integer(), non_neg_integer(), map()) :: :ok | {:error, term()}
Safely sets a cell in the buffer.
Starts a safe manager process.
Safely writes data to the buffer.