//! `Encoder`/`Decoder` for [`num_bigint::BigInt`] — arbitrary-precision Erlang
//! integers, including bignums beyond `i64`/`u64`. Gated behind the `bigint`
//! feature.
//!
//! Both directions go through [`Integer::from_bigint`]/[`Integer::to_bigint`],
//! which use the external term format for the >64-bit cases (the NIF API has no
//! bignum accessor). A non-integer term decodes as [`CodecError::WrongType`];
//! encoding never fails.
use BigInt;
use crate;
use crate;
/// Encodes any magnitude via [`Integer::from_bigint`] (an `i64`/`u64` fast path,
/// else ETF). Infallible.
/// Reads any integer term, however wide, via [`Integer::to_bigint`]. A
/// non-integer term is [`WrongType`](CodecError::WrongType).