[−][src]Derive Macro modtype_derive::ModType
#[derive(ModType)] { // Attributes available to this derive: #[modtype] }
Derives following traits.
std::convert::From
<
u8
>
std::convert::From
<
u16
>
std::convert::From
<
u32
>
std::convert::From
<
u64
>
std::convert::From
<
u128
>
std::convert::From
<
usize
>
std::convert::From
<
i8
>
std::convert::From
<
i16
>
std::convert::From
<
i32
>
std::convert::From
<
i64
>
std::convert::From
<
i128
>
std::convert::From
<
isize
>
std::convert::From
<
f32
>
std::convert::From
<
f64
>
std::convert::From
<
num::bigint::BigUint
>
std::convert::From
<
num::bigint::BigInt
>
std::clone::Clone
std::marker::Copy
std::default::Default
std::cmp::PartialEq
std::cmp::Eq
std::cmp::PartialOrd
std::cmp::Ord
std::fmt::Display
std::fmt::Debug
std::str::FromStr
std::ops::Deref
std::ops::Neg
std::ops::Add
std::ops::AddAssign
std::ops::Sub
std::ops::SubAssign
std::ops::Mul
std::ops::MulAssign
std::ops::Div
std::ops::DivAssign
std::ops::Rem
std::ops::RemAssign
num::traits::Num
num::traits::Zero
num::traits::One
num::traits::FromPrimitive
num::traits::Inv
num::traits::CheckedNeg
num::traits::CheckedAdd
num::traits::CheckedSub
num::traits::CheckedMul
num::traits::CheckedDiv
num::traits::CheckedRem
num::traits::Pow
Attributes
Struct
Name | Format | Optional |
---|---|---|
modulus | modulus = $ Lit where $ Lit is converted/parsed to an Expr | No |
cartridge | cartridge = $ LitStr where $ LitStr is parsed to a Path | No |
std | std = $ LitStr where $ LitStr is parsed to a Path | Yes (default = ::std ) |
num_traits | num_traits = $ LitStr where $ LitStr is parsed to a Path | Yes (default = ::num::traits ) |
num_integer | num_integer = $ LitStr where $ LitStr is parsed to a Path | Yes (default = ::num::integer ) |
num_bigint | num_bigint = $ LitStr where $ LitStr is parsed to a Path | Yes (default = ::num::bigint ) |
num_rational | num_rational = $ LitStr where $ LitStr is parsed to a Path | Yes (default = ::num::rational ) |
modtype | modtype = $ LitStr where $ LitStr is parsed to a Path | Yes (default = ::modtype ) |
non_static_modulus | non_static_modulus | Yes |
Field
Name | Format | Optional |
---|---|---|
value | value | No |
Requirements
- The
#[modtype(value)]
field is aUnsignedPrimitive
. - All fields are
Default
. - All fields are
Copy
. - All fields are
PartialEq
. - All fields are
Ord
.