[][src]Crate modtype

This crate provides:

  • Macros that implement modular arithmetic integer types
  • Preset types (modtype::preset::u64{, ::mod1000000007}::{F, Z})

Attributes

Struct

Name Format Optional
modulus modulus = #Lit where #Lit is converted/parsed to an Expr 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)
moving_ops_for_ref moving_ops_for_ref Yes

Field

Name Format Optional
value value No

ConstValue

Name Format Optional
const_value const_value = #LitInt where #LitInt has a suffix No

Re-exports

pub use modtype_derive::get;
pub use modtype_derive::new;
pub use modtype_derive::Add;
pub use modtype_derive::AddAssign;
pub use modtype_derive::BitAnd;
pub use modtype_derive::BitAndAssign;
pub use modtype_derive::BitOr;
pub use modtype_derive::BitOrAssign;
pub use modtype_derive::BitXor;
pub use modtype_derive::BitXorAssign;
pub use modtype_derive::Bounded;
pub use modtype_derive::ConstValue;
pub use modtype_derive::DebugTransparent;
pub use modtype_derive::DebugTransparent as Debug;
pub use modtype_derive::Deref;
pub use modtype_derive::Display;
pub use modtype_derive::Div;
pub use modtype_derive::DivAssign;
pub use modtype_derive::From;
pub use modtype_derive::FromPrimitive;
pub use modtype_derive::FromStr;
pub use modtype_derive::Integer;
pub use modtype_derive::Into;
pub use modtype_derive::Inv;
pub use modtype_derive::Mul;
pub use modtype_derive::MulAssign;
pub use modtype_derive::Num;
pub use modtype_derive::One;
pub use modtype_derive::Pow_u16;
pub use modtype_derive::Pow_u32;
pub use modtype_derive::Pow_u8;
pub use modtype_derive::Pow_usize;
pub use modtype_derive::Rem;
pub use modtype_derive::RemAssign;
pub use modtype_derive::Sub;
pub use modtype_derive::SubAssign;
pub use modtype_derive::ToBigInt;
pub use modtype_derive::ToBigUint;
pub use modtype_derive::ToPrimitive;
pub use modtype_derive::Unsigned;
pub use modtype_derive::Zero;

Modules

preset

Preset types.

Traits

ConstValue

A trait that has one associated constant value.