rustc-serialize 0.3.25

Generic serialization/deserialization support corresponding to the `derive(RustcEncodable, RustcDecodable)` mode in the compiler. Also includes support for hex, base64, and json encoding and decoding. This crate is deprecated in favor of serde.
Documentation

Build #2304761 2025-07-10 11:28:56

# rustc version rustc 1.90.0-nightly (e43d139a8 2025-07-09)

# docs.rs version docsrs 0.6.0 (c1135d19 2025-07-02)

# build log [INFO] running `Command { std: "docker" "create" "-v" "/home/cratesfyi/workspace/builds/rustc-serialize-0.3.25/target:/opt/rustwide/target:rw,Z" "-v" "/home/cratesfyi/workspace/builds/rustc-serialize-0.3.25/source:/opt/rustwide/workdir:ro,Z" "-v" "/home/cratesfyi/workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/home/cratesfyi/workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "DOCS_RS=1" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "6442450944" "--cpus" "6" "--user" "1001:1001" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:90999bfc7ae267e83380e433d8e61a7c072ca6729e92edbae886d3423b3a6f4c" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "rustdoc" "--lib" "-Zrustdoc-map" "--config" "build.rustdocflags=[\"--cfg\", \"docsrs\", \"-Z\", \"unstable-options\", \"--emit=invocation-specific\", \"--resource-suffix\", \"-20250709-1.90.0-nightly-e43d139a8\", \"--static-root-path\", \"/-/rustdoc.static/\", \"--cap-lints\", \"warn\", \"--extern-html-root-takes-precedence\"]" "--offline" "-Zunstable-options" "--config=doc.extern-map.registries.crates-io=\"https://docs.rs/{pkg_name}/{version}/x86_64-unknown-linux-gnu\"" "-Zrustdoc-scrape-examples" "-j6" "--target" "x86_64-unknown-linux-gnu", kill_on_drop: false }` [INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. [INFO] [stdout] 453b02c010945f0473dfa940bd2d4300dd0e1e775a47084cf6da0f86ebfe4432 [INFO] running `Command { std: "docker" "start" "-a" "453b02c010945f0473dfa940bd2d4300dd0e1e775a47084cf6da0f86ebfe4432", kill_on_drop: false }` [INFO] [stderr] warning: no edition set: defaulting to the 2015 edition while the latest is 2024 [INFO] [stderr] warning: target filter specified, but no targets matched; this is a no-op [INFO] [stderr] Documenting rustc-serialize v0.3.25 (/opt/rustwide/workdir) [INFO] [stderr] warning: unexpected `cfg` condition name: `rustbuild` [INFO] [stderr] --> src/lib.rs:37:13 [INFO] [stderr] | [INFO] [stderr] 37 | #![cfg_attr(rustbuild, feature(staged_api, rustc_private))] [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: expected names are: `docsrs`, `feature`, and `test` and 31 more [INFO] [stderr] = help: consider using a Cargo feature instead [INFO] [stderr] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stderr] [lints.rust] [INFO] [stderr] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(rustbuild)'] } [INFO] [stderr] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(rustbuild)");` to the top of the `build.rs` [INFO] [stderr] = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration [INFO] [stderr] = note: `#[warn(unexpected_cfgs)]` on by default [INFO] [stderr] [INFO] [stderr] warning: unexpected `cfg` condition name: `rustbuild` [INFO] [stderr] --> src/lib.rs:38:13 [INFO] [stderr] | [INFO] [stderr] 38 | #![cfg_attr(rustbuild, unstable(feature = "rustc_private", issue = "27812"))] [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: consider using a Cargo feature instead [INFO] [stderr] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stderr] [lints.rust] [INFO] [stderr] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(rustbuild)'] } [INFO] [stderr] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(rustbuild)");` to the top of the `build.rs` [INFO] [stderr] = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration [INFO] [stderr] [INFO] [stderr] warning: unexpected `cfg` condition name: `rust_build` [INFO] [stderr] --> src/lib.rs:45:13 [INFO] [stderr] | [INFO] [stderr] 45 | #![cfg_attr(rust_build, feature(staged_api))] [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: consider using a Cargo feature instead [INFO] [stderr] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stderr] [lints.rust] [INFO] [stderr] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(rust_build)'] } [INFO] [stderr] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(rust_build)");` to the top of the `build.rs` [INFO] [stderr] = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration [INFO] [stderr] [INFO] [stderr] warning: unexpected `cfg` condition name: `rust_build` [INFO] [stderr] --> src/lib.rs:46:13 [INFO] [stderr] | [INFO] [stderr] 46 | #![cfg_attr(rust_build, staged_api)] [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: consider using a Cargo feature instead [INFO] [stderr] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stderr] [lints.rust] [INFO] [stderr] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(rust_build)'] } [INFO] [stderr] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(rust_build)");` to the top of the `build.rs` [INFO] [stderr] = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration [INFO] [stderr] [INFO] [stderr] warning: unexpected `cfg` condition name: `rust_build` [INFO] [stderr] --> src/lib.rs:47:13 [INFO] [stderr] | [INFO] [stderr] 47 | #![cfg_attr(rust_build, [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: consider using a Cargo feature instead [INFO] [stderr] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stderr] [lints.rust] [INFO] [stderr] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(rust_build)'] } [INFO] [stderr] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(rust_build)");` to the top of the `build.rs` [INFO] [stderr] = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration [INFO] [stderr] [INFO] [stderr] warning: `...` range patterns are deprecated [INFO] [stderr] --> src/hex.rs:137:21 [INFO] [stderr] | [INFO] [stderr] 137 | b'A'...b'F' => buf |= byte - b'A' + 10, [INFO] [stderr] | ^^^ help: use `..=` for an inclusive range [INFO] [stderr] | [INFO] [stderr] = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! [INFO] [stderr] = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html> [INFO] [stderr] = note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default [INFO] [stderr] [INFO] [stderr] warning: `...` range patterns are deprecated [INFO] [stderr] --> src/hex.rs:138:21 [INFO] [stderr] | [INFO] [stderr] 138 | b'a'...b'f' => buf |= byte - b'a' + 10, [INFO] [stderr] | ^^^ help: use `..=` for an inclusive range [INFO] [stderr] | [INFO] [stderr] = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! [INFO] [stderr] = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html> [INFO] [stderr] [INFO] [stderr] warning: `...` range patterns are deprecated [INFO] [stderr] --> src/hex.rs:139:21 [INFO] [stderr] | [INFO] [stderr] 139 | b'0'...b'9' => buf |= byte - b'0', [INFO] [stderr] | ^^^ help: use `..=` for an inclusive range [INFO] [stderr] | [INFO] [stderr] = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! [INFO] [stderr] = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html> [INFO] [stderr] [INFO] [stderr] warning: `...` range patterns are deprecated [INFO] [stderr] --> src/json.rs:1543:25 [INFO] [stderr] | [INFO] [stderr] 1543 | '0' ... '9' => return self.error(InvalidNumber), [INFO] [stderr] | ^^^ help: use `..=` for an inclusive range [INFO] [stderr] | [INFO] [stderr] = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! [INFO] [stderr] = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html> [INFO] [stderr] [INFO] [stderr] warning: `...` range patterns are deprecated [INFO] [stderr] --> src/json.rs:1547:17 [INFO] [stderr] | [INFO] [stderr] 1547 | '1' ... '9' => { [INFO] [stderr] | ^^^ help: use `..=` for an inclusive range [INFO] [stderr] | [INFO] [stderr] = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! [INFO] [stderr] = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html> [INFO] [stderr] [INFO] [stderr] warning: `...` range patterns are deprecated [INFO] [stderr] --> src/json.rs:1550:33 [INFO] [stderr] | [INFO] [stderr] 1550 | c @ '0' ... '9' => { [INFO] [stderr] | ^^^ help: use `..=` for an inclusive range [INFO] [stderr] | [INFO] [stderr] = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! [INFO] [stderr] = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html> [INFO] [stderr] [INFO] [stderr] warning: `...` range patterns are deprecated [INFO] [stderr] --> src/json.rs:1579:17 [INFO] [stderr] | [INFO] [stderr] 1579 | '0' ... '9' => (), [INFO] [stderr] | ^^^ help: use `..=` for an inclusive range [INFO] [stderr] | [INFO] [stderr] = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! [INFO] [stderr] = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html> [INFO] [stderr] [INFO] [stderr] warning: `...` range patterns are deprecated [INFO] [stderr] --> src/json.rs:1587:25 [INFO] [stderr] | [INFO] [stderr] 1587 | c @ '0' ... '9' => { [INFO] [stderr] | ^^^ help: use `..=` for an inclusive range [INFO] [stderr] | [INFO] [stderr] = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! [INFO] [stderr] = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html> [INFO] [stderr] [INFO] [stderr] warning: `...` range patterns are deprecated [INFO] [stderr] --> src/json.rs:1616:17 [INFO] [stderr] | [INFO] [stderr] 1616 | '0' ... '9' => (), [INFO] [stderr] | ^^^ help: use `..=` for an inclusive range [INFO] [stderr] | [INFO] [stderr] = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! [INFO] [stderr] = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html> [INFO] [stderr] [INFO] [stderr] warning: `...` range patterns are deprecated [INFO] [stderr] --> src/json.rs:1621:25 [INFO] [stderr] | [INFO] [stderr] 1621 | c @ '0' ... '9' => { [INFO] [stderr] | ^^^ help: use `..=` for an inclusive range [INFO] [stderr] | [INFO] [stderr] = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! [INFO] [stderr] = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html> [INFO] [stderr] [INFO] [stderr] warning: `...` range patterns are deprecated [INFO] [stderr] --> src/json.rs:1647:25 [INFO] [stderr] | [INFO] [stderr] 1647 | c @ '0' ... '9' => n * 16 + ((c as u16) - ('0' as u16)), [INFO] [stderr] | ^^^ help: use `..=` for an inclusive range [INFO] [stderr] | [INFO] [stderr] = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! [INFO] [stderr] = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html> [INFO] [stderr] [INFO] [stderr] warning: `...` range patterns are deprecated [INFO] [stderr] --> src/json.rs:1648:25 [INFO] [stderr] | [INFO] [stderr] 1648 | c @ 'a' ... 'f' => n * 16 + (10 + (c as u16) - ('a' as u16)), [INFO] [stderr] | ^^^ help: use `..=` for an inclusive range [INFO] [stderr] | [INFO] [stderr] = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! [INFO] [stderr] = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html> [INFO] [stderr] [INFO] [stderr] warning: `...` range patterns are deprecated [INFO] [stderr] --> src/json.rs:1649:25 [INFO] [stderr] | [INFO] [stderr] 1649 | c @ 'A' ... 'F' => n * 16 + (10 + (c as u16) - ('A' as u16)), [INFO] [stderr] | ^^^ help: use `..=` for an inclusive range [INFO] [stderr] | [INFO] [stderr] = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! [INFO] [stderr] = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html> [INFO] [stderr] [INFO] [stderr] warning: `...` range patterns are deprecated [INFO] [stderr] --> src/json.rs:1680:32 [INFO] [stderr] | [INFO] [stderr] 1680 | 0xDC00 ... 0xDFFF => { [INFO] [stderr] | ^^^ help: use `..=` for an inclusive range [INFO] [stderr] | [INFO] [stderr] = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! [INFO] [stderr] = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html> [INFO] [stderr] [INFO] [stderr] warning: `...` range patterns are deprecated [INFO] [stderr] --> src/json.rs:1686:37 [INFO] [stderr] | [INFO] [stderr] 1686 | n1 @ 0xD800 ... 0xDBFF => { [INFO] [stderr] | ^^^ help: use `..=` for an inclusive range [INFO] [stderr] | [INFO] [stderr] = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! [INFO] [stderr] = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html> [INFO] [stderr] [INFO] [stderr] warning: `...` range patterns are deprecated [INFO] [stderr] --> src/json.rs:1916:17 [INFO] [stderr] | [INFO] [stderr] 1916 | '0' ... '9' | '-' => self.parse_number(), [INFO] [stderr] | ^^^ help: use `..=` for an inclusive range [INFO] [stderr] | [INFO] [stderr] = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! [INFO] [stderr] = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html> [INFO] [stderr] [INFO] [stderr] warning: unresolved link to `3` [INFO] [stderr] --> src/json.rs:1257:25 [INFO] [stderr] | [INFO] [stderr] 1257 | /// For example foo.bar[3].x [INFO] [stderr] | ^ no item named `3` in scope [INFO] [stderr] | [INFO] [stderr] = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` [INFO] [stderr] = note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default [INFO] [stderr] [INFO] [stderr] warning: unresolved link to `3` [INFO] [stderr] --> src/json.rs:1265:65 [INFO] [stderr] | [INFO] [stderr] 1265 | /// StackElements compositing the stack that represents foo.bar[3].x [INFO] [stderr] | ^ no item named `3` in scope [INFO] [stderr] | [INFO] [stderr] = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]` [INFO] [stderr] [INFO] [stderr] warning: `rustc-serialize` (lib doc) generated 23 warnings (run `cargo fix --lib -p rustc-serialize` to apply 16 suggestions) [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.62s [INFO] [stderr] Generated /opt/rustwide/target/x86_64-unknown-linux-gnu/doc/rustc_serialize/index.html [INFO] running `Command { std: "docker" "inspect" "453b02c010945f0473dfa940bd2d4300dd0e1e775a47084cf6da0f86ebfe4432", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "453b02c010945f0473dfa940bd2d4300dd0e1e775a47084cf6da0f86ebfe4432", kill_on_drop: false }` [INFO] [stdout] 453b02c010945f0473dfa940bd2d4300dd0e1e775a47084cf6da0f86ebfe4432