llmclient 0.3.2

Rust LLM client - Gemini, OpenAI, Claude, Mistral, DeepSeek, Groq
Documentation
#[derive(Debug, Clone, PartialEq)]
pub struct Grid {
    pub colour: Colour,
    pub cells: Matrix<Cell>,
}

#[repr(usize)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub enum Colour {
    Black = 0,
    Blue = 1,
    Red = 2,
    Green = 3,
    Yellow = 4,
    Grey = 5,
    Fuchsia = 6,
    Orange = 7,
    Teal = 8,
    Brown = 9,
    ToBlack = 10,
    ToBlue = 11,
    ToRed = 12,
    ToGreen = 13,
    ToYellow = 14,
    ToGrey = 15,
    ToFuchsia = 16,
    ToOrange = 17,
    ToTeal = 18,
    ToBrown = 19,
    FromBlack = 20,
    FromBlue = 21,
    FromRed = 22,
    FromGreen = 23,
    FromYellow = 24,
    FromGrey = 25,
    FromFuchsia = 26,
    FromOrange = 27,
    FromTeal = 28,
    FromBrown = 29,
    SameBlack = 30,
    SameBlue = 31,
    SameRed = 32,
    SameGreen = 33,
    SameYellow = 34,
    SameGrey = 35,
    SameFuchsia = 36,
    SameOrange = 37,
    SameTeal = 38,
    SameBrown = 39,
    DiffBlack = 40,
    DiffBlue = 41,
    DiffRed = 42,
    DiffGreen = 43,
    DiffYellow = 44,
    DiffGrey = 45,
    DiffFuchsia = 46,
    DiffOrange = 47,
    DiffTeal = 48,
    DiffBrown = 49,
    OrigBlack = 50,
    OrigBlue = 51,
    OrigRed = 52,
    OrigGreen = 53,
    OrigYellow = 54,
    OrigGrey = 55,
    OrigFuchsia = 56,
    OrigOrange = 57,
    OrigTeal = 58,
    OrigBrown = 59,
    NoColour = 100,
    Mixed = 101,
    DiffShape = 102,    // Naughty overlading of enum
    Same = 103,         // Naughty overlading of enum
}

#[derive(Clone, Debug, Eq, Hash, PartialEq)]
pub struct Matrix<C> {
    pub rows: usize,
    pub columns: usize,
    data: Vec<C>,
}

Example method in Grid impl

    pub fn col_colour_matrix(m: &Matrix<Cell>, y: usize, colour: Colour) -> Colour {
        for x in 1 .. m.rows {
            if m[(x,y)].colour != colour {
                return Colour::Mixed;
            }
        }

        colour
    }