get-size 0.1.4

Determine the size in bytes an object occupies inside RAM.
Documentation
Build #1659757 2025-01-23T05:45:37.081649+00:00
# rustc version
rustc 1.86.0-nightly (649b995a9 2025-01-22)# docs.rs version
docsrs 0.6.0 (29a0e81b 2025-01-22)# build log
[INFO] running `Command { std: "docker" "create" "-v" "/home/cratesfyi/workspace/builds/get-size-0.1.4/target:/opt/rustwide/target:rw,Z" "-v" "/home/cratesfyi/workspace/builds/get-size-0.1.4/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:c80049f3b88b82089a44e0f06d0d6029d44b96b7257e55a1cd63dbc9f4c33334" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "rustdoc" "--lib" "-Zrustdoc-map" "--all-features" "--config" "build.rustdocflags=[\"--cfg\", \"docsrs\", \"--cfg\", \"docsrs\", \"-Z\", \"unstable-options\", \"--emit=invocation-specific\", \"--resource-suffix\", \"-20250122-1.86.0-nightly-649b995a9\", \"--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] [stdout] 23ead10b21eafdad990147938c8da1f05274927078b4f5685cbc1a654d8aeb66
[INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap.
[INFO] running `Command { std: "docker" "start" "-a" "23ead10b21eafdad990147938c8da1f05274927078b4f5685cbc1a654d8aeb66", kill_on_drop: false }`
[INFO] [stderr] warning: target filter specified, but no targets matched; this is a no-op
[INFO] [stderr]  Documenting get-size v0.1.4 (/opt/rustwide/workdir)
[INFO] [stderr] warning: redundant explicit link target
[INFO] [stderr]  --> src/./lib.md:3:127
[INFO] [stderr]   |
[INFO] [stderr] 3 | ...k as well as in the heap. The [`size_of`](std::mem::size_of) function provided by the standard library can already be used to determin...
[INFO] [stderr]   |                                   ---------  ^^^^^^^^^^^^^^^^^ explicit target is redundant
[INFO] [stderr]   |                                   |
[INFO] [stderr]   |                                   because label contains path that resolves to same destination
[INFO] [stderr]   |
[INFO] [stderr]   = note: when a link's destination is not specified,
[INFO] [stderr]           the label is used to resolve intra-doc links
[INFO] [stderr]   = note: `#[warn(rustdoc::redundant_explicit_links)]` on by default
[INFO] [stderr] help: remove explicit link target
[INFO] [stderr]   |
[INFO] [stderr] 3 | The [`GetSize`] trait can be used to determine the size of an object inside the stack as well as in the heap. The [`size_of`] function provided by the standard library can already be used to determine the size of an object in the stack, but many application (e.g. for caching) do also need to know the number of bytes occupied inside the heap, for which this library provides an appropriate trait.
[INFO] [stderr]   |                                                                                                                   ~~~~~~~~~~~
[INFO] [stderr] 
[INFO] [stderr] warning: redundant explicit link target
[INFO] [stderr]   --> src/./lib.md:91:109
[INFO] [stderr]    |
[INFO] [stderr] 91 | ...d by the standard library, like [`Vec`](std::vec::Vec), [`HashMap`](std::collections::HashMap), [`String`] as well as all the primitiv...
[INFO] [stderr]    |                                     -----  ^^^^^^^^^^^^^ explicit target is redundant
[INFO] [stderr]    |                                     |
[INFO] [stderr]    |                                     because label contains path that resolves to same destination
[INFO] [stderr]    |
[INFO] [stderr]    = note: when a link's destination is not specified,
[INFO] [stderr]            the label is used to resolve intra-doc links
[INFO] [stderr] help: remove explicit link target
[INFO] [stderr]    |
[INFO] [stderr] 91 | The [`GetSize`] trait is already implemented for most objects defined by the standard library, like [`Vec`], [`HashMap`](std::collections::HashMap), [`String`] as well as all the primitive values, like [`u8`], [`i32`] etc.
[INFO] [stderr]    |                                                                                                     ~~~~~~~
[INFO] [stderr] 
[INFO] [stderr] warning: redundant explicit link target
[INFO] [stderr]   --> src/./lib.md:91:137
[INFO] [stderr]    |
[INFO] [stderr] 91 | ... like [`Vec`](std::vec::Vec), [`HashMap`](std::collections::HashMap), [`String`] as well as all the primitive values, like [`u8`], [`i...
[INFO] [stderr]    |                                   ---------  ^^^^^^^^^^^^^^^^^^^^^^^^^ explicit target is redundant
[INFO] [stderr]    |                                   |
[INFO] [stderr]    |                                   because label contains path that resolves to same destination
[INFO] [stderr]    |
[INFO] [stderr]    = note: when a link's destination is not specified,
[INFO] [stderr]            the label is used to resolve intra-doc links
[INFO] [stderr] help: remove explicit link target
[INFO] [stderr]    |
[INFO] [stderr] 91 | The [`GetSize`] trait is already implemented for most objects defined by the standard library, like [`Vec`](std::vec::Vec), [`HashMap`], [`String`] as well as all the primitive values, like [`u8`], [`i32`] etc.
[INFO] [stderr]    |                                                                                                                             ~~~~~~~~~~~
[INFO] [stderr] 
[INFO] [stderr] warning: `get-size` (lib doc) generated 3 warnings
[INFO] [stderr]     Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.33s
[INFO] [stderr]    Generated /opt/rustwide/target/x86_64-unknown-linux-gnu/doc/get_size/index.html
[INFO] running `Command { std: "docker" "inspect" "23ead10b21eafdad990147938c8da1f05274927078b4f5685cbc1a654d8aeb66", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "rm" "-f" "23ead10b21eafdad990147938c8da1f05274927078b4f5685cbc1a654d8aeb66", kill_on_drop: false }`
[INFO] [stdout] 23ead10b21eafdad990147938c8da1f05274927078b4f5685cbc1a654d8aeb66