macro_rules! impl_algebra {
(@inner [$($bound:tt)*]; $t:ty;) => { ... };
(@inner [$($bound:tt)*]; $t:ty; op: $f:expr; $($rest:tt)*) => { ... };
(@inner [$($bound:tt)*]; $t:ty; id: $f:expr; $($rest:tt)*) => { ... };
(@inner [$($bound:tt)*]; $t:ty; inv: $f:expr; $($rest:tt)*) => { ... };
(@inner [$($bound:tt)*]; $t:ty; commu; $($rest:tt)*) => { ... };
(@inner [$($bound:tt)*]; $t:ty; assoc; $($rest:tt)*) => { ... };
(@inner [$($bound:tt)*]; $t:ty; idem; $($rest:tt)*) => { ... };
([$($bound:tt)*]; $t:ty; $($rest:tt)*) => { ... };
($t:ty; $($rest:tt)*) => { ... };
}
Expand description
Set
, BinaryOp
,
Identity
, Inverse
,
Commutative
, Associative
,
Idempotence
を実装する。