Grid

Struct Grid 

Source
pub struct Grid {
    pub colour: Colour,
    pub cells: Matrix<Cell>,
}

Fields§

§colour: Colour§cells: Matrix<Cell>

Implementations§

Source§

impl Grid

Source

pub fn new(rows: usize, cols: usize, colour: Colour) -> Self

Source

pub fn trivial() -> Self

Source

pub fn dummy() -> Self

Source

pub fn is_trivial(&self) -> bool

Source

pub fn is_dummy(&self) -> bool

Source

pub fn new_from_matrix(cells: &Matrix<Cell>) -> Self

Source

pub fn rip(&self, colour: Colour) -> Self

Source

pub fn duplicate(grid: &[Vec<usize>]) -> Self

Source

pub fn is_empty(&self) -> bool

Source

pub fn to_origin(&self) -> Self

Source

pub fn to_origin_mut(&mut self)

Source

pub fn find_colour_pixel_coords(&self, colour: Colour) -> (usize, usize)

Source

pub fn find_different_pixel_coords(&self) -> (usize, usize)

Source

pub fn find_colour(&self, colour: Colour) -> Vec<Cell>

Source

pub fn in_to_squared_out(&self) -> Self

Source

pub fn find_all_colours(&self) -> BTreeMap<Colour, usize>

Source

pub fn find_min_colour(&self) -> Colour

Source

pub fn find_max_colour(&self) -> Colour

Source

pub fn stretch_down(&self) -> Self

Source

pub fn is_diag_origin(&self) -> bool

Source

pub fn is_diag_not_origin(&self) -> bool

Source

pub fn gravity_down(&self) -> Self

Source

pub fn gravity_down_colour(&self, colour: Colour) -> Self

Source

pub fn gravity_up(&self) -> Self

Source

pub fn gravity_right(&self) -> Self

Source

pub fn gravity_left(&self) -> Self

Source

pub fn move_down(&self) -> Self

Source

pub fn move_up(&self) -> Self

Source

pub fn move_right(&self) -> Self

Source

pub fn move_left(&self) -> Self

Source

pub fn trim(&self, r: usize, c: usize) -> Self

Source

pub fn free_border(&self, dir: Direction) -> bool

Source

pub fn negative_mut(&mut self, colour: Colour)

Source

pub fn negative_dir_all_mut(&mut self, colour: Colour)

Source

pub fn negative_dir_mut(&mut self, colour: Colour, exclude: Vec<Direction>)

Source

pub fn background_border_mut(&mut self)

Source

pub fn row_dividers_mut(&mut self, rs: usize)

Source

pub fn col_dividers_mut(&mut self, cs: usize)

Source

pub fn recolour(&self, from: Colour, to: Colour) -> Self

Source

pub fn recolour_mut(&mut self, from: Colour, to: Colour)

Source

pub fn force_recolour(&self, to: Colour) -> Self

Source

pub fn copy_to_position(&self, grid: &Self, r: usize, c: usize) -> Self

Source

pub fn copy_to_position_mut(&mut self, grid: &Self, rp: usize, cp: usize)

Source

pub fn copy_shape_to_grid_mut(&mut self, shape: &Shape)

Source

pub fn copy_shape_to_grid_position_mut( &mut self, shape: &Shape, row: usize, col: usize, )

Source

pub fn connect_dots_pairs(&mut self)

Source

pub fn connect_dots(&mut self)

Source

pub fn connect_dots_colour(&mut self, colour: Colour)

Source

pub fn connect_dots_colour_pairs(&mut self, colour: Colour)

Source

pub fn connect_dots_dir(&mut self, dir: Direction, col: Colour)

Source

pub fn draw_lines_from_shapes( &mut self, shapes: &[Shape], overwrite: bool, hv: bool, )

Source

pub fn draw_lines(&mut self, shapes: &[&Shape], overwrite: bool, hv: bool)

Source

pub fn draw_mut(&mut self, dir: Direction, r: usize, c: usize, colour: Colour)

Source

pub fn draw_bg_mut( &mut self, dir: Direction, r: usize, c: usize, colour: Colour, bg: Colour, )

Source

pub fn draw_mc_mut( &mut self, dir: Direction, r: usize, c: usize, colour: Colour, )

Source

pub fn draw_term_mut( &mut self, dir: Direction, r: usize, c: usize, colour: Colour, )

Source

pub fn draw_bg_mc_mut( &mut self, dir: Direction, r: usize, c: usize, colour: Colour, bg: Colour, )

Source

pub fn draw_bg_term_mut( &mut self, dir: Direction, r: usize, c: usize, colour: Colour, bg: Colour, )

Source

pub fn draw_bg_mc_term_mut( &mut self, dir: Direction, r: usize, c: usize, colour: Colour, bg: Colour, mc: bool, term: bool, )

Source

pub fn draw_bg_mc_term_other_mut( &mut self, dir: Direction, r: usize, c: usize, colour: Colour, bg: Colour, mc: bool, term: bool, other_colour: Colour, )

Source

pub fn skip_to(&self, dir: Direction, r: usize, c: usize) -> (usize, usize)

Source

pub fn skip_to_bg( &self, dir: Direction, r: usize, c: usize, bg: Colour, ) -> (usize, usize)

Source

pub fn calc_direction(r1: usize, c1: usize, r2: usize, c2: usize) -> Direction

Source

pub fn shape_in_line(&self, shape: &Shape) -> Colour

Source

pub fn trim_excess_mut(&mut self)

Source

pub fn draw_line_row( &mut self, s1: &Shape, s2: &Shape, colour: Colour, overwrite: bool, fill: bool, )

Source

pub fn draw_line_row_coords( &mut self, r1: usize, c1: usize, r2: usize, c2: usize, colour: Colour, overwrite: bool, fill: bool, thick: usize, )

Source

pub fn draw_line_col( &mut self, s1: &Shape, s2: &Shape, colour: Colour, overwrite: bool, fill: bool, )

Source

pub fn draw_line_col_coords( &mut self, r1: usize, c1: usize, r2: usize, c2: usize, colour: Colour, overwrite: bool, fill: bool, thick: usize, )

Source

pub fn extend_border(&self) -> Self

Source

pub fn extend_right(&self) -> Self

Source

pub fn extend_left(&self) -> Self

Source

pub fn extend_down(&self) -> Self

Source

pub fn extend_up(&self) -> Self

Source

pub fn extend_right_by(&self, amount: usize) -> Self

Source

pub fn extend_left_by(&self, amount: usize) -> Self

Source

pub fn extend_down_by(&self, amount: usize) -> Self

Source

pub fn extend_up_by(&self, amount: usize) -> Self

Source

pub fn dup_func(&self, lr: bool, func: &dyn Fn(&Self) -> Self) -> Self

Source

pub fn dup_right(&self) -> Self

Source

pub fn dup_left(&self) -> Self

Source

pub fn dup_down(&self) -> Self

Source

pub fn dup_up(&self) -> Self

Source

pub fn dup_right_func(&self, func: &dyn Fn(&Self) -> Self) -> Self

Source

pub fn dup_left_func(&self, func: &dyn Fn(&Self) -> Self) -> Self

Source

pub fn dup_down_func(&self, func: &dyn Fn(&Self) -> Self) -> Self

Source

pub fn dup_up_func(&self, func: &dyn Fn(&Self) -> Self) -> Self

Source

pub fn mirror_dir_func(&self, lr: bool, func: &dyn Fn(&Self) -> Self) -> Self

Source

pub fn mirror_dir(&self, lr: bool) -> Self

Source

pub fn mirror_right(&self) -> Self

Source

pub fn mirror_left(&self) -> Self

Source

pub fn mirror_down(&self) -> Self

Source

pub fn mirror_up(&self) -> Self

Source

pub fn mirror_right_func(&self, func: &dyn Fn(&Self) -> Self) -> Self

Source

pub fn mirror_left_func(&self, func: &dyn Fn(&Self) -> Self) -> Self

Source

pub fn mirror_down_func(&self, func: &dyn Fn(&Self) -> Self) -> Self

Source

pub fn mirror_up_func(&self, func: &dyn Fn(&Self) -> Self) -> Self

Source

pub fn pixels(&self) -> usize

Source

pub fn transform(&self, trans: Transformation) -> Self

Source

pub fn inverse_transform(&self, trans: Transformation) -> Self

Source

pub fn inverse_colour(&self) -> Self

Source

pub fn colour(&self) -> Colour

Source

pub fn size(&self) -> usize

Source

pub fn same_size(&self, other: &Self) -> bool

Source

pub fn same_shape(&self, other: &Self) -> bool

Source

pub fn dimensions(&self) -> (usize, usize)

Source

pub fn add_border(&self, n: usize) -> Self

Source

pub fn add_border_colour(&self, n: usize, colour: Colour) -> Self

Source

pub fn remove_border(&self, n: usize) -> Self

Source

pub fn max_dim(&self) -> usize

Source

pub fn derive_missing_rule(&self, other: &Self) -> Self

Source

pub fn apply_missing_rule(&self, other: &Self) -> Self

Source

pub fn copy_centre(&mut self, cr: usize, cc: usize, other: &Self)

Source

pub fn fill_border(&mut self)

Source

pub fn has_colour( &self, tlr: usize, tlc: usize, rlen: usize, clen: usize, colour: Colour, ) -> bool

Source

pub fn find_row_seq( &self, sr: usize, sc: usize, seq: &[Colour], width: usize, ) -> (usize, usize)

Source

pub fn find_col_seq( &self, sr: usize, sc: usize, seq: &[Colour], length: usize, ) -> (usize, usize)

Source

pub fn colour_every_nxn_for_m( colour: Colour, side: usize, n: usize, m: usize, ) -> Self

Source

pub fn colour_dimensions(&self, colour: Colour) -> (usize, usize)

Source

pub fn bigger(&self, other: &Self) -> bool

Source

pub fn smaller(&self, other: &Self) -> bool

Source

pub fn cell_count(&self) -> usize

Source

pub fn cell_count_colour(&self, colour: Colour) -> usize

Source

pub fn flood_fill( &self, x: usize, y: usize, ignore_colour: Colour, new_colour: Colour, ) -> Self

Source

pub fn flood_fill_bg( &self, r: usize, c: usize, ignore_colour: Colour, bg: Colour, new_colour: Colour, ) -> Self

Source

pub fn flood_fill_mut( &mut self, r: usize, c: usize, ignore_colour: Colour, new_colour: Colour, )

Source

pub fn flood_fill_border_mut( &mut self, ignore_colour: Colour, new_colour: Colour, )

Source

pub fn flood_fill_bg_mut( &mut self, r: usize, c: usize, ignore_colour: Colour, bg: Colour, new_colour: Colour, )

Source

pub fn flood_fill_from_seeds( &self, ignore_colour: Colour, new_colour: Colour, ) -> Self

Source

pub fn subgrid(&self, tlr: usize, sr: usize, tlc: usize, sc: usize) -> Self

Source

pub fn cell_colours(&self) -> Vec<Colour>

Source

pub fn cell_colour_cnt_map(&self) -> BTreeMap<Colour, usize>

Source

pub fn cell_colour_posn_map(&self) -> BTreeMap<Colour, Vec<(usize, usize)>>

Source

pub fn majority_colour(&self) -> Colour

Source

pub fn minority_colour(&self) -> Colour

Source

pub fn get_diff_colour(&self, other: &Self) -> Colour

Source

pub fn cell_colour_cnt_map_diff(&self) -> BTreeMap<Colour, usize>

Source

pub fn even_rows(&self) -> bool

Source

pub fn even_columns(&self) -> bool

Source

pub fn border_top(&self) -> bool

Source

pub fn border_bottom(&self) -> bool

Source

pub fn border_left(&self) -> bool

Source

pub fn border_right(&self) -> bool

Source

pub fn has_border(&self) -> bool

Source

pub fn mirrored_rows(&self) -> Self

Source

pub fn mirrored_cols(&self) -> Self

Source

pub fn populate_skew_edge_lr(&self, shape: &Shape, colour: Colour) -> Shape

Source

pub fn populate_skew_edge_tb(&self, shape: &Shape, colour: Colour) -> Shape

Source

pub fn is_mirror_rows(&self) -> bool

Source

pub fn is_mirror_cols(&self) -> bool

Source

pub fn is_symmetric(&self) -> bool

Source

pub fn is_mirror_offset_rows(&self, skew: i32) -> bool

Source

pub fn is_mirror_offset_cols(&self, skew: i32) -> bool

Source

pub fn is_panelled_rows(&self) -> bool

Source

pub fn is_panelled_cols(&self) -> bool

Source

pub fn transpose(&mut self)

Source

pub fn transposed(&self) -> Self

Source

pub fn inv_transposed(&self) -> Self

Source

pub fn rotated_90(&self, times: usize) -> Self

Source

pub fn rotated_270(&self, times: usize) -> Self

Source

pub fn rotate_90(&self, times: usize) -> Self

Source

pub fn rot_00(&self) -> Self

Source

pub fn rot_90(&self) -> Self

Source

pub fn rot_180(&self) -> Self

Source

pub fn rot_270(&self) -> Self

Source

pub fn rot_rect_90(&self) -> Self

Source

pub fn rot_rect_180(&self) -> Self

Source

pub fn rot_rect_270(&self) -> Self

Source

pub fn colours(&self) -> BTreeMap<Colour, usize>

Source

pub fn min_colour(&self) -> Colour

Source

pub fn max_colour(&self) -> Colour

Source

pub fn no_colours(&self) -> usize

Source

pub fn single_colour(&self) -> Colour

Source

pub fn do_circle(&self, colour: Colour, spiral: bool) -> Self

Source

pub fn circle(&self, colour: Colour) -> Self

Source

pub fn spiral(&self, colour: Colour) -> Self

Source

pub fn show_matrix(m: &Matrix<Cell>, diff: bool, io: bool)

Source

pub fn show_summary(&self)

Source

pub fn show(&self)

Source

pub fn show_full(&self)

Source

pub fn show_out(&self)

Source

pub fn show_io(&self)

Source

pub fn has_bg_grid(&self) -> Colour

Source

pub fn has_bg_grid_coloured(&self) -> Colour

Source

pub fn has_bg_grid_not_sq(&self) -> Colour

Source

pub fn has_bg_grid_coloured_not_sq(&self) -> Colour

Source

pub fn ray(&self, _direction: (i8, i8)) -> Shape

Source

pub fn move(&self, _direction: (i8, i8)) -> Shape

Source

pub fn template_shapes(&self, template: &Self) -> Shapes

Source

pub fn fill_template(&self, filler: &Shape) -> Self

Source

pub fn scale_up(&self, factor: usize) -> Self

Source

pub fn scale_down(&self, factor: usize) -> Self

Source

pub fn resize(&self, factor: usize) -> Self

Source

pub fn resize_inc(&self, factor: usize) -> Self

Source

pub fn find_patch(&self, patch: &Shape) -> (usize, usize)

Source

pub fn find_axis_colour(&self, shape: &Shape) -> Colour

Source

pub fn find_axis_colour_bg(&self, shape: &Shape, bg: Colour) -> Colour

Source

pub fn colour_squares(&mut self, colour: Colour)

Source

pub fn find_black_patches(&self) -> Shapes

Source

pub fn find_black_patches_limit(&self, limit: usize) -> Shapes

Source

pub fn find_colour_patches(&self, colour: Colour) -> Shapes

Source

pub fn find_colour_patches_limit(&self, colour: Colour, limit: usize) -> Shapes

Source

pub fn toddle_colour(&self, bg: Colour, fg: Colour) -> Self

Source

pub fn to_shapes_base_bg(&self, bg: Colour) -> Shapes

Source

pub fn mid_div_colour(&self) -> Colour

Source

pub fn has_shapes_base_bg(&self) -> bool

Source

pub fn copy_part_matrix( rs: usize, cs: usize, rows: usize, cols: usize, cells: &Matrix<Cell>, ) -> Matrix<Cell>

Source

pub fn to_shapes_coloured(&self) -> Shapes

Source

pub fn to_shapes(&self) -> Shapes

Source

pub fn to_shapes_cons(&self) -> Shapes

Source

pub fn to_shapes_coloured_bg(&self, bg: Colour) -> Shapes

Source

pub fn to_shapes_bg(&self, bg: Colour) -> Shapes

Source

pub fn to_shapes_bg_cons(&self, bg: Colour) -> Shapes

Source

pub fn to_shapes_coloured_cbg(&self) -> Shapes

Source

pub fn to_shapes_cbg(&self) -> Shapes

Source

pub fn to_shapes_coloured_sq(&self) -> Shapes

Source

pub fn to_shapes_sq(&self) -> Shapes

Source

pub fn to_shapes_coloured_bg_sq(&self, bg: Colour) -> Shapes

Source

pub fn to_shapes_bg_sq(&self, bg: Colour) -> Shapes

Source

pub fn to_shapes_coloured_cbg_sq(&self) -> Shapes

Source

pub fn to_shapes_cbg_sq(&self) -> Shapes

Source

pub fn to_shapes_from_grid_gap(&self, gap: usize) -> Shapes

Source

pub fn to_shapes_from_grid_border(&self, border: usize) -> Shapes

Source

pub fn to_shapes_from_grid(&self) -> Shapes

Source

pub fn to_shapes_from_grid_gap_border( &self, gap: usize, border: usize, ) -> Shapes

Source

pub fn as_shape(&self) -> Shape

Source

pub fn as_shape_position(&self, r: usize, c: usize) -> Shape

Source

pub fn as_shapes(&self) -> Shapes

Source

pub fn as_shapes_position(&self, r: usize, c: usize) -> Shapes

Source

pub fn as_pixel_shapes(&self) -> Shapes

Source

pub fn repeat_rows(&self, start: usize, colour: Colour) -> Vec<usize>

Source

pub fn cover_rows(&self, start: usize, colour: Colour) -> Self

Source

pub fn repeat_cols(&self, start: usize, colour: Colour) -> Vec<usize>

Source

pub fn is_square(&self) -> bool

Source

pub fn square(&self) -> usize

Source

pub fn height(&self) -> usize

Source

pub fn width(&self) -> usize

Source

pub fn row_colour(&self, r: usize) -> Colour

Source

pub fn row_colour_matrix(m: &Matrix<Cell>, r: usize, colour: Colour) -> Colour

Source

pub fn find_pixel(&self, colour: Colour) -> (usize, usize)

Source

pub fn invert_colour(&self) -> Self

Source

pub fn invert_colour_new(&self, colour: Colour) -> Self

Source

pub fn blank(&self) -> Self

Source

pub fn col_colour(&self, c: usize) -> Colour

Source

pub fn col_colour_matrix(m: &Matrix<Cell>, c: usize, colour: Colour) -> Colour

Source

pub fn div9(&self) -> bool

Source

pub fn is_3x3(&self) -> bool

Source

pub fn is_full(&self) -> bool

Source

pub fn has_marker(&self, shape: &Shape) -> bool

Source

pub fn has_marker_colour(&self, s: &Shape, colour: Colour) -> bool

Source

pub fn find_rectangles(&self) -> Shapes

Source

pub fn has_gravity(&self, orientation: usize) -> bool

Source

pub fn has_gravity_colour(&self, orientation: usize, colour: Colour) -> bool

Source

pub fn has_gravity_down(&self) -> bool

Source

pub fn has_gravity_up(&self) -> bool

Source

pub fn has_gravity_left(&self) -> bool

Source

pub fn has_gravity_right(&self) -> bool

Source

pub fn equals(&self, other: &Self) -> Colour

Source

pub fn bleach(&self) -> Self

Source

pub fn equal_footprint(&self, other: &Self) -> bool

Source

pub fn equal_shape(&self, other: &Self) -> bool

Source

pub fn diff_only_diff(&self) -> Self

Source

pub fn diff_only_and(&self, colour: Colour) -> Self

Source

pub fn diff_only_or(&self, colour: Colour) -> Self

Source

pub fn diff_only_xor(&self, colour: Colour) -> Self

Source

pub fn diff_only_not(&self, colour: Colour) -> Self

Source

pub fn diff_only_same(&self) -> Self

Source

pub fn diff_black_same(&self, colour: Colour) -> Self

Source

pub fn diff_other_same(&self, colour: Colour) -> Self

Source

pub fn find_unique_colours(&self) -> Vec<Colour>

Source

pub fn find_colour_row_order(&self) -> BTreeMap<usize, Colour>

Source

pub fn diff_only_transparent(&self) -> Self

Source

pub fn diff(&self, other: &Self) -> Option<Self>

Source

pub fn diff_orig(&self, other: &Self) -> Option<Self>

Source

pub fn diff_impl(&self, other: &Self, diff: bool) -> Option<Self>

Source

pub fn distance(&self, other: &Self) -> f64

Source

pub fn centre_of(&self) -> (usize, usize)

Source

pub fn centre_of_symmetry(&self) -> (usize, usize)

Source

pub fn corners(&self) -> (usize, usize, usize, usize)

Source

pub fn row_skew(&self) -> isize

Source

pub fn col_skew(&self) -> isize

Source

pub fn count_diff(&self) -> (usize, usize)

Source

pub fn tile_mut(&mut self, tile: &Self)

Source

pub fn roll_right(&self) -> Self

Source

pub fn roll_left(&self) -> Self

Source

pub fn roll_up(&self) -> Self

Source

pub fn roll_down(&self) -> Self

Source

pub fn to_json(&self) -> String

Source

pub fn to_vec(&self) -> Vec<Vec<usize>>

Source

pub fn corner_colours(&self) -> (Colour, Colour, Colour, Colour)

Source

pub fn corner_idx(&self) -> (Self, Direction)

Source

pub fn corner_body(&self, dir: Direction) -> Self

Source

pub fn split_n_horizontal(&self, n: usize) -> Vec<Self>

Source

pub fn split_n_vertical(&self, n: usize) -> Vec<Self>

Source

pub fn split_4(&self) -> Vec<Self>

Source

pub fn split_4_inline(&self, delimiter: bool) -> Shapes

Source

pub fn full_row(&self, shape: &Shape) -> bool

Source

pub fn full_col(&self, shape: &Shape) -> bool

Source

pub fn full_dim_split(&self, shapes: &Shapes) -> (Colour, Shapes)

Source

pub fn split_2(&self) -> Shapes

Source

pub fn full(&self) -> bool

Source

pub fn get_patch(&self, r: usize, c: usize, rows: usize, cols: usize) -> Shape

Source

pub fn fill_patch_mut(&mut self, other: &Shape, or: usize, oc: usize)

Source

pub fn fill_patch_coord_mut( &mut self, or: usize, oc: usize, rs: usize, cs: usize, colour: Colour, )

Source

pub fn used_in_row(&self, r: usize, colour: Colour) -> bool

Code constraint solver predicates

Source

pub fn used_in_col(&self, c: usize, colour: Colour) -> bool

Source

pub fn solve( &mut self, pred: &dyn Fn(&Self, usize, usize, Colour) -> bool, ) -> bool

Source

pub fn solve_depth( &mut self, pred: &dyn Fn(&Self, usize, usize, Colour) -> bool, depth: usize, ) -> bool

Trait Implementations§

Source§

impl Clone for Grid

Source§

fn clone(&self) -> Grid

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Grid

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Hash for Grid

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for Grid

Source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for Grid

Source§

fn eq(&self, other: &Grid) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for Grid

Source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Eq for Grid

Source§

impl StructuralPartialEq for Grid

Auto Trait Implementations§

§

impl Freeze for Grid

§

impl RefUnwindSafe for Grid

§

impl Send for Grid

§

impl Sync for Grid

§

impl Unpin for Grid

§

impl UnwindSafe for Grid

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.