Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/MatrixFrog/crossword
/ functions
Functions
89 in github.com/MatrixFrog/crossword
⨍
Functions
89
◇
Types & classes
16
↓ 26 callers
Method
get
Returns the [Square] at the given [Pos].
crossword/src/lib.rs:352
↓ 13 callers
Method
is_black
Whether this is [Square::Black].
crossword/src/lib.rs:260
↓ 9 callers
Method
is_empty
(&self)
crossword/src/lib.rs:264
↓ 8 callers
Function
checksum_metadata_string
(s: &[u8], input_checksum: u16)
crossword/src/checksum.rs:21
↓ 7 callers
Function
checksum_region
(base: &[u8], input_checksum: u16)
crossword/src/checksum.rs:5
↓ 7 callers
Method
is_white
Whether this is not a black square, i.e. either a [Square::Empty] or [Square::Letter].
crossword/src/lib.rs:269
↓ 7 callers
Method
take_n_bytes
Take the next `n`` bytes.
crossword/src/puz.rs:289
↓ 6 callers
Method
adjust_direction
(&mut self, grid: &Grid)
crossword/src/lib.rs:596
↓ 6 callers
Method
height
The height of this grid.
crossword/src/lib.rs:337
↓ 6 callers
Method
width
The width of this grid.
crossword/src/lib.rs:332
↓ 5 callers
Method
advance_to_next_word
Moves the cursor to the start of the next word after the current one that is in the same direction as the cursor. If we are already on the last `Acros
crossword/src/lib.rs:658
↓ 5 callers
Function
decode_str
Turns a NUL-terminated string into a standard String. Uses UTF-8 first, and then ISO-8859-1 if that fails.
crossword/src/puz.rs:180
↓ 5 callers
Method
get_start
Determines the position of the start of the word that contains the cursor, and is in the same direction as the cursor.
crossword/src/lib.rs:483
↓ 5 callers
Method
grid
Returns a reference to the current puzzle grid.
crossword/src/lib.rs:81
↓ 5 callers
Method
parse_nul_terminated_string
Parses a C-style NUL-terminated string, including the NUL byte. In this function, we return just the raw bytes as they appear in the file. Converting
crossword/src/puz.rs:306
↓ 5 callers
Method
parse_short
Consume the next two bytes and return them as a `u16`, interpreted as little-endian.
crossword/src/puz.rs:260
↓ 4 callers
Method
positions
An iterator over all the positions of this grid, from left to right and top to bottom.
crossword/src/lib.rs:342
↓ 3 callers
Method
current_clue_identifier
The identifier of the clue for the currently selected word.
crossword/src/lib.rs:156
↓ 3 callers
Method
next
(&mut self)
crossword/src/lib.rs:517
↓ 3 callers
Method
render
(self, area: Rect, buf: &mut Buffer)
crosstui/src/main.rs:123
↓ 3 callers
Method
starts_across
Whether the given position is the start of an Across entry.
crossword/src/lib.rs:464
↓ 3 callers
Method
starts_down
Whether the given position is the start of a Down entry.
crossword/src/lib.rs:473
↓ 2 callers
Function
checksum_clue
(s: &[u8], input_checksum: u16)
crossword/src/checksum.rs:31
↓ 2 callers
Method
down_neighbor
Returns the square immediately below the given position, or `Square::Black` if the given position is on the bottom edge of the grid.
crossword/src/lib.rs:428
↓ 2 callers
Method
erase_letter
Sets the current square to [Empty](Square::Empty).
crossword/src/lib.rs:187
↓ 2 callers
Method
is_valid
(&self, grid: &Grid)
crossword/src/lib.rs:577
↓ 2 callers
Method
left
(&mut self, grid: &Grid)
crossword/src/lib.rs:709
↓ 2 callers
Method
left_neighbor
Returns the square immediately to the left of the given position, or `Square::Black` if the given position is on the left edge of the grid.
crossword/src/lib.rs:438
↓ 2 callers
Function
parse_puzzle
(path: &str)
crossword/src/main.rs:5
↓ 2 callers
Method
pop
Consume and return the next byte, or return None if that can't be done.
crossword/src/puz.rs:249
↓ 2 callers
Method
right_neighbor
Returns the square immediately to the right of the given position, or `Square::Black` if the given position is on the right edge of the grid.
crossword/src/lib.rs:448
↓ 2 callers
Method
set
(&mut self, (r, c): Pos, square: Square)
crossword/src/lib.rs:356
↓ 2 callers
Method
size
The size of this grid, expressed as (width, height).
crossword/src/lib.rs:327
↓ 2 callers
Method
starts
(&self, pos: Pos, direction: Direction)
crossword/src/lib.rs:456
↓ 2 callers
Method
title
(&self)
crossword/src/lib.rs:85
↓ 2 callers
Method
up
(&mut self, grid: &Grid)
crossword/src/lib.rs:695
↓ 2 callers
Method
up_neighbor
Returns the square immediately above the given position, or `Square::Black` if the given position is on the top edge of the grid.
crossword/src/lib.rs:418
↓ 1 callers
Method
add_letter
Writes the given letter to the current square.
crossword/src/lib.rs:178
↓ 1 callers
Method
advance_cursor_to_next_word
Moves the cursor to the next word in the puzzle.
crossword/src/lib.rs:206
↓ 1 callers
Function
allocate_clues
( grid: &Grid, clue_list: &[String], )
crossword/src/puz.rs:194
↓ 1 callers
Method
author
(&self)
crossword/src/lib.rs:89
↓ 1 callers
Method
backup
(&mut self, grid: &Grid)
crossword/src/lib.rs:688
↓ 1 callers
Method
backup_cursor
Moves the cursor back one square, if possible. That is, one square to the left if the current cursor direction is Across, and one square up, if the cu
crossword/src/lib.rs:194
↓ 1 callers
Function
basic_grid
()
crossword/src/lib.rs:750
↓ 1 callers
Method
clues
Returns a sorted list of all the clues for the given [Direction].
crossword/src/lib.rs:102
↓ 1 callers
Method
copyright
(&self)
crossword/src/lib.rs:93
↓ 1 callers
Method
cross_clue_identifier
The identifier of the clue for the word that *would* be selected if the user were to swap the cursor direction.
crossword/src/lib.rs:163
↓ 1 callers
Method
cursor_direction
(&self)
crossword/src/lib.rs:230
↓ 1 callers
Method
cursor_down
(&mut self)
crossword/src/lib.rs:221
↓ 1 callers
Method
cursor_left
(&mut self)
crossword/src/lib.rs:224
↓ 1 callers
Method
cursor_right
(&mut self)
crossword/src/lib.rs:227
↓ 1 callers
Method
cursor_up
(&mut self)
crossword/src/lib.rs:218
↓ 1 callers
Method
down
(&mut self, grid: &Grid)
crossword/src/lib.rs:702
↓ 1 callers
Method
handle_crossterm_events
Reads the crossterm events and updates the state of [`App`].
crosstui/src/main.rs:84
↓ 1 callers
Method
is_filled
Whether this grid is fully filled in -- that is, has no `Square::Empty` in it.
crossword/src/lib.rs:347
↓ 1 callers
Method
is_solved
Whether the puzzle is fully filled in, and matches the solution.
crossword/src/lib.rs:76
↓ 1 callers
Function
load_puzzle
(path: &Path)
crosstui/src/main.rs:40
↓ 1 callers
Method
move_cursor_to_next_empty_in_current_word
Moves the cursor to the next empty square in the current word, or if there are no empty squares left, to the start of the next word.
crossword/src/lib.rs:200
↓ 1 callers
Method
move_to_next_empty_in_current_word
Moves the cursor to the next empty square starting from the current one, in the current word. If there are no empty squares at or after the current o
crossword/src/lib.rs:609
↓ 1 callers
Method
next_down_neighbor
Returns the position of the next white square below `pos`.
crossword/src/lib.rs:375
↓ 1 callers
Method
next_left_neighbor
Returns the position of the next white square to the left of `pos`.
crossword/src/lib.rs:389
↓ 1 callers
Method
next_right_neighbor
Returns the position of the next white square to the right of `pos`.
crossword/src/lib.rs:403
↓ 1 callers
Method
next_up_neighbor
Returns the position of the next white square above `pos`.
crossword/src/lib.rs:361
↓ 1 callers
Method
notes
(&self)
crossword/src/lib.rs:97
↓ 1 callers
Method
on_key_event
Handles the key events and updates the state of [`App`].
crosstui/src/main.rs:92
↓ 1 callers
Method
quit
Set running to false to quit the application.
crosstui/src/main.rs:117
↓ 1 callers
Function
render_square
(square: Square, style: Style, area: Rect, buf: &mut Buffer)
crosstui/src/main.rs:310
↓ 1 callers
Method
right
(&mut self, grid: &Grid)
crossword/src/lib.rs:716
↓ 1 callers
Method
run
(mut self, terminal: &mut DefaultTerminal)
crosstui/src/main.rs:74
↓ 1 callers
Method
square_style
Determines how a particular square should be styled. See [SquareStyle].
crossword/src/lib.rs:121
↓ 1 callers
Method
swap_cursor_direction
Attempts to swap the cursor direction. However, if the current square is only part of an across clue, the direction cannot be switched to down, and vi
crossword/src/lib.rs:213
↓ 1 callers
Method
take_exact
Take the next `expected.len()` bytes, if they match `expected`.
crossword/src/puz.rs:271
↓ 1 callers
Function
to_ratatui_style
(value: SquareStyle)
crosstui/src/main.rs:301
Method
current_clue
The text of the clue for the currently selected word.
crossword/src/lib.rs:151
Method
fmt
(&self, f: &mut std::fmt::Formatter<'_>)
crossword/src/puz.rs:236
Method
fmt
(&self, f: &mut std::fmt::Formatter<'_>)
crossword/src/lib.rs:38
Method
from
(value: &u8)
crossword/src/lib.rs:292
Method
from_grid
(grid: &Grid)
crossword/src/lib.rs:564
Function
grid_starts
()
crossword/src/lib.rs:770
Function
main
A simple CLI for testing .puz parsing
crossword/src/main.rs:11
Function
main
()
crosstui/src/main.rs:33
Method
new
(data: Vec<u8>)
crossword/src/puz.rs:244
Method
new
(size: (usize, usize))
crossword/src/lib.rs:510
Method
new
(puzzle: Puzzle)
crosstui/src/main.rs:67
Method
not
(self)
crossword/src/lib.rs:29
Method
parse
Creates a Puz from the bytes of a `.puz` file.
crossword/src/puz.rs:30
Method
parse
Creates a Puzzle from the bytes of a `.puz` file.
crossword/src/lib.rs:68
Function
parse_v12_puzzle
()
crossword/src/puz.rs:360
Method
to_char
(&self)
crossword/src/lib.rs:47