rsheet_lib 0.2.0

Libraries to help implementing cs6991-24T1-ass2
Documentation
//! This module contains the Reply enum, which is used to send messages
//! from the program back to the user.

use serde::{Deserialize, Serialize};

use crate::cell_value::CellValue;

/// This is a message from the program back to a user.
#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Hash, Clone)]
pub enum Reply {
    /// This indicates that the user requested a value, and the
    /// program is returning that value. The string should indicate
    /// a Cell (like `A1` or `B7`) and the CellValue should be
    /// the value of that cell.
    Value(String, CellValue),
    /// This indicates that the user took an action which was invalid.
    /// This might be anything from an invalid command, to a circular
    /// dependency.
    Error(String),
}