1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// Copyright 2026 PARK Youngho.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your option.
// This file may not be copied, modified, or distributed
// except according to those terms.
///////////////////////////////////////////////////////////////////////////////
use SmallUInt;
/// For the future use, this trait `SudokuElement` is defined for sudoku
/// elements. It is supposed to be implemented by any data type that supports
/// cryptocol::number::SmallUInt. It can be removed in the future
/// if it is not necessary.
/*
macro_rules! SudokuElement_for_int_impl
{
($($f:ty), *) => {
$(
impl SudokuElement for $f
{
fn new() -> Self
{
0 as $f
}
fn get_id(&self) -> u128
{
*self as u128
}
fn one() -> Self
{
1 as $f
}
}
)*
};
}
*/
// SudokuElement_for_int_impl! { u8, u16, u32, u64, u128, usize }
// SudokuElement_for_int_impl! { i8, i16, i32, i64, i128, isize }