docs.rs failed to build alloy-primitives-0.8.26
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
alloy-primitives-1.4.1
alloy-primitives
Primitive types shared by alloy, foundry, revm, and reth.
Types
- Unsigned integers re-exported from ruint
- Signed integers, as a wrapper around
ruintintegers - Fixed-size byte arrays via [
FixedBytes]- [
wrap_fixed_bytes!]: macro for constructing named fixed bytes types - [
Address], which is a fixed-size byte array of 20 bytes, with EIP-55 and EIP-1191 checksum support - [
fixed_bytes!], [address!] and other macros to construct the types at compile time
- [
Examples
This library has straightforward, basic, types. Usage is correspondingly simple. Please consult the documentation for more information.
use ;
// FixedBytes
let n: = fixed_bytes!;
assert_eq!;
assert_eq!;
// Uint
let mut n: U256 = "42".parse.unwrap;
n += U256from;
assert_eq!;
// Signed
let mut n: I256 = "-42".parse.unwrap;
n = -n;
assert_eq!;
// Address
let addr_str = "0x66f9664f97F2b50F62D13eA064982f936dE76657";
let addr: Address = parse_checksummed.unwrap;
assert_eq!;
assert_eq!;
// Address checksummed with a custom chain id
let addr_str = "0x66F9664f97f2B50F62d13EA064982F936de76657";
let addr: Address = parse_checksummed.unwrap;
assert_eq!;
assert_eq!;