This commit is contained in:
filipriec
2025-03-30 00:51:11 +01:00
parent 9622e0bd3c
commit 6e0943f0cc
7 changed files with 97 additions and 80 deletions

View File

@@ -0,0 +1,17 @@
// src/modes/handlers/read_only.rs
use async_trait::async_trait;
use crate::tui::terminal::grpc_client::GrpcClient;
#[async_trait]
pub trait ReadOnlyHandler {
async fn handle_read_only_action(
&mut self,
action: &str,
grpc_client: &mut GrpcClient,
current_position: &mut u64,
total_count: u64,
) -> Result<String, Box<dyn std::error::Error>>;
// Add this method
fn adjust_cursor_position(&mut self, ideal_column: &mut usize);
}