YAI-flash-recreation/target/rls/debug/deps/save-analysis/librand-1af5b0ae7ab63d3f.json
VincentKnightTesting c46d579bad sorry commit
2022-05-05 12:03:21 -05:00

1 line
618 KiB
JSON

{"config":{"output_file":null,"full_docs":false,"pub_only":true,"reachable_only":true,"distro_crate":false,"signatures":false,"borrow_data":false},"version":"0.19.1","compilation":{"directory":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5","program":"/home/gallant/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rls","arguments":["--crate-name","rand","--edition=2018","/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","--json=diagnostic-rendered-ansi,future-incompat","--crate-type","lib","--emit=dep-info,metadata","-C","embed-bitcode=no","-C","debuginfo=2","--cfg","feature=\"alloc\"","--cfg","feature=\"default\"","--cfg","feature=\"getrandom\"","--cfg","feature=\"libc\"","--cfg","feature=\"rand_chacha\"","--cfg","feature=\"std\"","--cfg","feature=\"std_rng\"","-C","metadata=1af5b0ae7ab63d3f","-C","extra-filename=-1af5b0ae7ab63d3f","--out-dir","/home/gallant/Documents/git/youareanidiot/target/rls/debug/deps","-L","dependency=/home/gallant/Documents/git/youareanidiot/target/rls/debug/deps","--extern","libc=/home/gallant/Documents/git/youareanidiot/target/rls/debug/deps/liblibc-85a1d1b767afc43e.rmeta","--extern","rand_chacha=/home/gallant/Documents/git/youareanidiot/target/rls/debug/deps/librand_chacha-57972ea9c03fb30c.rmeta","--extern","rand_core=/home/gallant/Documents/git/youareanidiot/target/rls/debug/deps/librand_core-bc4694db5c0e63ca.rmeta","--cap-lints","allow","--error-format=json","--sysroot","/home/gallant/.rustup/toolchains/stable-x86_64-unknown-linux-gnu"],"output":"/home/gallant/Documents/git/youareanidiot/target/rls/debug/deps/librand-1af5b0ae7ab63d3f.rmeta"},"prelude":{"crate_id":{"name":"rand","disambiguator":[13036674555719028254,0]},"crate_root":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src","external_crates":[{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","num":1,"id":{"name":"core","disambiguator":[5443730852259234579,0]}},{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","num":2,"id":{"name":"compiler_builtins","disambiguator":[4162025702538114948,0]}},{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","num":3,"id":{"name":"rustc_std_workspace_core","disambiguator":[17612152343462746361,0]}},{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","num":4,"id":{"name":"std","disambiguator":[14026078687029744792,0]}},{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","num":5,"id":{"name":"alloc","disambiguator":[5560808256873132085,0]}},{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","num":6,"id":{"name":"libc","disambiguator":[135160560163186024,0]}},{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","num":7,"id":{"name":"unwind","disambiguator":[5800521777261530329,0]}},{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","num":8,"id":{"name":"cfg_if","disambiguator":[7095478770525139037,0]}},{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","num":9,"id":{"name":"hashbrown","disambiguator":[17225897750877482818,0]}},{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","num":10,"id":{"name":"rustc_std_workspace_alloc","disambiguator":[15613653607383163471,0]}},{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","num":11,"id":{"name":"rustc_demangle","disambiguator":[12428323400248712701,0]}},{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","num":12,"id":{"name":"std_detect","disambiguator":[11893279639181573711,0]}},{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","num":13,"id":{"name":"addr2line","disambiguator":[13583305032161054644,0]}},{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","num":14,"id":{"name":"gimli","disambiguator":[16609837797022023111,0]}},{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","num":15,"id":{"name":"object","disambiguator":[18098459435141129808,0]}},{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","num":16,"id":{"name":"memchr","disambiguator":[15244551393771456017,0]}},{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","num":17,"id":{"name":"miniz_oxide","disambiguator":[6576340271055396708,0]}},{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","num":18,"id":{"name":"adler","disambiguator":[15284510821186066958,0]}},{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","num":19,"id":{"name":"panic_unwind","disambiguator":[12982807908830018159,0]}},{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","num":20,"id":{"name":"rand_core","disambiguator":[12889323934562554227,0]}},{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","num":21,"id":{"name":"getrandom","disambiguator":[1108089700107934696,0]}},{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","num":22,"id":{"name":"cfg_if","disambiguator":[1004283514336169005,0]}},{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","num":23,"id":{"name":"libc","disambiguator":[14926449781656206643,0]}},{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/std.rs","num":24,"id":{"name":"rand_chacha","disambiguator":[7069928851083402988,0]}},{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/std.rs","num":25,"id":{"name":"ppv_lite86","disambiguator":[2933753580364552420,0]}}],"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":408,"byte_end":6643,"line_start":10,"line_end":214,"column_start":1,"column_end":2}},"imports":[{"kind":"Use","ref_id":{"krate":20,"index":193},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":2791,"byte_end":2800,"line_start":94,"line_end":94,"column_start":21,"column_end":30},"alias_span":null,"name":"CryptoRng","value":"","parent":{"krate":0,"index":0}},{"kind":"Use","ref_id":{"krate":20,"index":109},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":2802,"byte_end":2807,"line_start":94,"line_end":94,"column_start":32,"column_end":37},"alias_span":null,"name":"Error","value":"","parent":{"krate":0,"index":0}},{"kind":"Use","ref_id":{"krate":20,"index":188},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":2809,"byte_end":2816,"line_start":94,"line_end":94,"column_start":39,"column_end":46},"alias_span":null,"name":"RngCore","value":"","parent":{"krate":0,"index":0}},{"kind":"Use","ref_id":{"krate":20,"index":194},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":2818,"byte_end":2829,"line_start":94,"line_end":94,"column_start":48,"column_end":59},"alias_span":null,"name":"SeedableRng","value":"","parent":{"krate":0,"index":0}},{"kind":"Use","ref_id":{"krate":0,"index":115},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":11237,"byte_end":11246,"line_start":108,"line_end":108,"column_start":27,"column_end":36},"alias_span":null,"name":"IntoFloat","value":"","parent":{"krate":0,"index":328}},{"kind":"Use","ref_id":{"krate":0,"index":1646},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted.rs","byte_start":162139,"byte_end":162152,"line_start":14,"line_end":14,"column_start":17,"column_end":30},"alias_span":null,"name":"WeightedIndex","value":"","parent":{"krate":0,"index":462}},{"kind":"Use","ref_id":{"krate":0,"index":1663},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted.rs","byte_start":162154,"byte_end":162167,"line_start":14,"line_end":14,"column_start":32,"column_end":45},"alias_span":null,"name":"WeightedError","value":"","parent":{"krate":0,"index":462}},{"kind":"Use","ref_id":{"krate":0,"index":1122},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":11525,"byte_end":11534,"line_start":119,"line_end":119,"column_start":27,"column_end":36},"alias_span":null,"name":"Bernoulli","value":"","parent":{"krate":0,"index":24}},{"kind":"Use","ref_id":{"krate":0,"index":1133},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":11536,"byte_end":11550,"line_start":119,"line_end":119,"column_start":38,"column_end":52},"alias_span":null,"name":"BernoulliError","value":"","parent":{"krate":0,"index":24}},{"kind":"Use","ref_id":{"krate":0,"index":60},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":11582,"byte_end":11594,"line_start":120,"line_end":120,"column_start":30,"column_end":42},"alias_span":null,"name":"Distribution","value":"","parent":{"krate":0,"index":24}},{"kind":"Use","ref_id":{"krate":0,"index":1147},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":11596,"byte_end":11604,"line_start":120,"line_end":120,"column_start":44,"column_end":52},"alias_span":null,"name":"DistIter","value":"","parent":{"krate":0,"index":24}},{"kind":"Use","ref_id":{"krate":0,"index":1159},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":11606,"byte_end":11613,"line_start":120,"line_end":120,"column_start":54,"column_end":61},"alias_span":null,"name":"DistMap","value":"","parent":{"krate":0,"index":24}},{"kind":"Use","ref_id":{"krate":0,"index":93},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":11670,"byte_end":11680,"line_start":122,"line_end":122,"column_start":29,"column_end":39},"alias_span":null,"name":"DistString","value":"","parent":{"krate":0,"index":24}},{"kind":"Use","ref_id":{"krate":0,"index":1180},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":11704,"byte_end":11710,"line_start":123,"line_end":123,"column_start":23,"column_end":29},"alias_span":null,"name":"Open01","value":"","parent":{"krate":0,"index":24}},{"kind":"Use","ref_id":{"krate":0,"index":1181},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":11704,"byte_end":11710,"line_start":123,"line_end":123,"column_start":23,"column_end":29},"alias_span":null,"name":"Open01","value":"","parent":{"krate":0,"index":24}},{"kind":"Use","ref_id":{"krate":0,"index":1173},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":11712,"byte_end":11724,"line_start":123,"line_end":123,"column_start":31,"column_end":43},"alias_span":null,"name":"OpenClosed01","value":"","parent":{"krate":0,"index":24}},{"kind":"Use","ref_id":{"krate":0,"index":1174},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":11712,"byte_end":11724,"line_start":123,"line_end":123,"column_start":31,"column_end":43},"alias_span":null,"name":"OpenClosed01","value":"","parent":{"krate":0,"index":24}},{"kind":"Use","ref_id":{"krate":0,"index":1253},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":11748,"byte_end":11760,"line_start":124,"line_end":124,"column_start":22,"column_end":34},"alias_span":null,"name":"Alphanumeric","value":"","parent":{"krate":0,"index":24}},{"kind":"Use","ref_id":{"krate":0,"index":1254},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":11748,"byte_end":11760,"line_start":124,"line_end":124,"column_start":22,"column_end":34},"alias_span":null,"name":"Alphanumeric","value":"","parent":{"krate":0,"index":24}},{"kind":"Use","ref_id":{"krate":0,"index":1572},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":11783,"byte_end":11788,"line_start":125,"line_end":125,"column_start":22,"column_end":27},"alias_span":null,"name":"Slice","value":"","parent":{"krate":0,"index":24}},{"kind":"Use","ref_id":{"krate":0,"index":1683},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":11828,"byte_end":11835,"line_start":127,"line_end":127,"column_start":24,"column_end":31},"alias_span":null,"name":"Uniform","value":"","parent":{"krate":0,"index":24}},{"kind":"Use","ref_id":{"krate":0,"index":1663},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":11894,"byte_end":11907,"line_start":129,"line_end":129,"column_start":32,"column_end":45},"alias_span":null,"name":"WeightedError","value":"","parent":{"krate":0,"index":24}},{"kind":"Use","ref_id":{"krate":0,"index":1646},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":11909,"byte_end":11922,"line_start":129,"line_end":129,"column_start":47,"column_end":60},"alias_span":null,"name":"WeightedIndex","value":"","parent":{"krate":0,"index":24}},{"kind":"Use","ref_id":{"krate":0,"index":60},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/prelude.rs","byte_start":163908,"byte_end":163920,"line_start":21,"line_end":21,"column_start":49,"column_end":61},"alias_span":null,"name":"Distribution","value":"","parent":{"krate":0,"index":531}},{"kind":"Use","ref_id":{"krate":0,"index":2391},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/prelude.rs","byte_start":164068,"byte_end":164074,"line_start":26,"line_end":26,"column_start":40,"column_end":46},"alias_span":null,"name":"StdRng","value":"","parent":{"krate":0,"index":531}},{"kind":"Use","ref_id":{"krate":0,"index":2405},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/prelude.rs","byte_start":164165,"byte_end":164174,"line_start":29,"line_end":29,"column_start":22,"column_end":31},"alias_span":null,"name":"ThreadRng","value":"","parent":{"krate":0,"index":531}},{"kind":"Use","ref_id":{"krate":0,"index":1032},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/prelude.rs","byte_start":164215,"byte_end":164229,"line_start":30,"line_end":30,"column_start":40,"column_end":54},"alias_span":null,"name":"IteratorRandom","value":"","parent":{"krate":0,"index":531}},{"kind":"Use","ref_id":{"krate":0,"index":1004},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/prelude.rs","byte_start":164231,"byte_end":164242,"line_start":30,"line_end":30,"column_start":56,"column_end":67},"alias_span":null,"name":"SliceRandom","value":"","parent":{"krate":0,"index":531}},{"kind":"Use","ref_id":{"krate":0,"index":1120},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/prelude.rs","byte_start":164329,"byte_end":164335,"line_start":33,"line_end":33,"column_start":17,"column_end":23},"alias_span":null,"name":"random","value":"","parent":{"krate":0,"index":531}},{"kind":"Use","ref_id":{"krate":0,"index":843},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/prelude.rs","byte_start":164337,"byte_end":164347,"line_start":33,"line_end":33,"column_start":25,"column_end":35},"alias_span":null,"name":"thread_rng","value":"","parent":{"krate":0,"index":531}},{"kind":"Use","ref_id":{"krate":20,"index":193},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/prelude.rs","byte_start":164384,"byte_end":164393,"line_start":34,"line_end":34,"column_start":35,"column_end":44},"alias_span":null,"name":"CryptoRng","value":"","parent":{"krate":0,"index":531}},{"kind":"Use","ref_id":{"krate":0,"index":603},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/prelude.rs","byte_start":164395,"byte_end":164398,"line_start":34,"line_end":34,"column_start":46,"column_end":49},"alias_span":null,"name":"Rng","value":"","parent":{"krate":0,"index":531}},{"kind":"Use","ref_id":{"krate":20,"index":188},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/prelude.rs","byte_start":164400,"byte_end":164407,"line_start":34,"line_end":34,"column_start":51,"column_end":58},"alias_span":null,"name":"RngCore","value":"","parent":{"krate":0,"index":531}},{"kind":"Use","ref_id":{"krate":20,"index":194},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/prelude.rs","byte_start":164409,"byte_end":164420,"line_start":34,"line_end":34,"column_start":60,"column_end":71},"alias_span":null,"name":"SeedableRng","value":"","parent":{"krate":0,"index":531}},{"kind":"Use","ref_id":{"krate":0,"index":2351},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/mod.rs","byte_start":189803,"byte_end":189812,"line_start":15,"line_end":15,"column_start":22,"column_end":31},"alias_span":null,"name":"ReadError","value":"","parent":{"krate":0,"index":634}},{"kind":"Use","ref_id":{"krate":0,"index":2345},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/mod.rs","byte_start":189814,"byte_end":189821,"line_start":15,"line_end":15,"column_start":33,"column_end":40},"alias_span":null,"name":"ReadRng","value":"","parent":{"krate":0,"index":634}},{"kind":"Use","ref_id":{"krate":0,"index":2356},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/mod.rs","byte_start":189849,"byte_end":189861,"line_start":16,"line_end":16,"column_start":26,"column_end":38},"alias_span":null,"name":"ReseedingRng","value":"","parent":{"krate":0,"index":634}},{"kind":"Use","ref_id":{"krate":0,"index":2391},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":189138,"byte_end":189144,"line_start":115,"line_end":115,"column_start":48,"column_end":54},"alias_span":null,"name":"StdRng","value":"","parent":{"krate":0,"index":633}},{"kind":"Use","ref_id":{"krate":0,"index":2405},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":189218,"byte_end":189227,"line_start":116,"line_end":116,"column_start":73,"column_end":82},"alias_span":null,"name":"ThreadRng","value":"","parent":{"krate":0,"index":633}},{"kind":"Use","ref_id":{"krate":20,"index":252},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":189333,"byte_end":189338,"line_start":119,"line_end":119,"column_start":50,"column_end":55},"alias_span":null,"name":"OsRng","value":"","parent":{"krate":0,"index":633}},{"kind":"Use","ref_id":{"krate":20,"index":253},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":189333,"byte_end":189338,"line_start":119,"line_end":119,"column_start":50,"column_end":55},"alias_span":null,"name":"OsRng","value":"","parent":{"krate":0,"index":633}},{"kind":"Use","ref_id":{"krate":0,"index":843},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":3025,"byte_end":3035,"line_start":105,"line_end":105,"column_start":30,"column_end":40},"alias_span":null,"name":"thread_rng","value":"","parent":{"krate":0,"index":0}},{"kind":"Use","ref_id":{"krate":0,"index":624},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":3051,"byte_end":3055,"line_start":106,"line_end":106,"column_start":15,"column_end":19},"alias_span":null,"name":"Fill","value":"","parent":{"krate":0,"index":0}},{"kind":"Use","ref_id":{"krate":0,"index":603},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":3057,"byte_end":3060,"line_start":106,"line_end":106,"column_start":21,"column_end":24},"alias_span":null,"name":"Rng","value":"","parent":{"krate":0,"index":0}}],"defs":[{"kind":"Mod","id":{"krate":0,"index":0},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":408,"byte_end":6643,"line_start":10,"line_end":214,"column_start":1,"column_end":2},"name":"","qualname":"::","value":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","parent":null,"children":[{"krate":0,"index":1},{"krate":0,"index":2},{"krate":0,"index":3},{"krate":0,"index":4},{"krate":0,"index":5},{"krate":0,"index":6},{"krate":0,"index":7},{"krate":0,"index":8},{"krate":0,"index":9},{"krate":0,"index":10},{"krate":0,"index":11},{"krate":0,"index":12},{"krate":0,"index":15},{"krate":0,"index":18},{"krate":0,"index":21},{"krate":0,"index":24},{"krate":0,"index":531},{"krate":0,"index":568},{"krate":0,"index":633},{"krate":0,"index":862},{"krate":0,"index":1103},{"krate":0,"index":1106},{"krate":0,"index":1107},{"krate":0,"index":1110},{"krate":0,"index":1113},{"krate":0,"index":1114},{"krate":0,"index":1117},{"krate":0,"index":1118},{"krate":0,"index":1120}],"decl_id":null,"docs":" Utilities for random number generation","sig":null,"attributes":[{"value":"/ Utilities for random number generation","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":408,"byte_end":450,"line_start":10,"line_end":10,"column_start":1,"column_end":43}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":451,"byte_end":454,"line_start":11,"line_end":11,"column_start":1,"column_end":4}},{"value":"/ Rand provides utilities to generate random numbers, to convert them to","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":455,"byte_end":529,"line_start":12,"line_end":12,"column_start":1,"column_end":75}},{"value":"/ useful types and distributions, and some randomness-related algorithms.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":530,"byte_end":605,"line_start":13,"line_end":13,"column_start":1,"column_end":76}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":606,"byte_end":609,"line_start":14,"line_end":14,"column_start":1,"column_end":4}},{"value":"/ # Quick Start","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":610,"byte_end":627,"line_start":15,"line_end":15,"column_start":1,"column_end":18}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":628,"byte_end":631,"line_start":16,"line_end":16,"column_start":1,"column_end":4}},{"value":"/ To get you started quickly, the easiest and highest-level way to get","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":632,"byte_end":704,"line_start":17,"line_end":17,"column_start":1,"column_end":73}},{"value":"/ a random value is to use [`random()`]; alternatively you can use","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":705,"byte_end":773,"line_start":18,"line_end":18,"column_start":1,"column_end":69}},{"value":"/ [`thread_rng()`]. The [`Rng`] trait provides a useful API on all RNGs, while","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":774,"byte_end":854,"line_start":19,"line_end":19,"column_start":1,"column_end":81}},{"value":"/ the [`distributions`] and [`seq`] modules provide further","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":855,"byte_end":916,"line_start":20,"line_end":20,"column_start":1,"column_end":62}},{"value":"/ functionality on top of RNGs.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":917,"byte_end":950,"line_start":21,"line_end":21,"column_start":1,"column_end":34}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":951,"byte_end":954,"line_start":22,"line_end":22,"column_start":1,"column_end":4}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":955,"byte_end":962,"line_start":23,"line_end":23,"column_start":1,"column_end":8}},{"value":"/ use rand::prelude::*;","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":963,"byte_end":988,"line_start":24,"line_end":24,"column_start":1,"column_end":26}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":989,"byte_end":992,"line_start":25,"line_end":25,"column_start":1,"column_end":4}},{"value":"/ if rand::random() { // generates a boolean","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":993,"byte_end":1039,"line_start":26,"line_end":26,"column_start":1,"column_end":47}},{"value":"/ // Try printing a random unicode code point (probably a bad idea)!","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":1040,"byte_end":1114,"line_start":27,"line_end":27,"column_start":1,"column_end":75}},{"value":"/ println!(\"char: {}\", rand::random::<char>());","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":1115,"byte_end":1168,"line_start":28,"line_end":28,"column_start":1,"column_end":54}},{"value":"/ }","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":1169,"byte_end":1174,"line_start":29,"line_end":29,"column_start":1,"column_end":6}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":1175,"byte_end":1178,"line_start":30,"line_end":30,"column_start":1,"column_end":4}},{"value":"/ let mut rng = rand::thread_rng();","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":1179,"byte_end":1216,"line_start":31,"line_end":31,"column_start":1,"column_end":38}},{"value":"/ let y: f64 = rng.gen(); // generates a float between 0 and 1","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":1217,"byte_end":1281,"line_start":32,"line_end":32,"column_start":1,"column_end":65}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":1282,"byte_end":1285,"line_start":33,"line_end":33,"column_start":1,"column_end":4}},{"value":"/ let mut nums: Vec<i32> = (1..100).collect();","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":1286,"byte_end":1334,"line_start":34,"line_end":34,"column_start":1,"column_end":49}},{"value":"/ nums.shuffle(&mut rng);","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":1335,"byte_end":1362,"line_start":35,"line_end":35,"column_start":1,"column_end":28}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":1363,"byte_end":1370,"line_start":36,"line_end":36,"column_start":1,"column_end":8}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":1371,"byte_end":1374,"line_start":37,"line_end":37,"column_start":1,"column_end":4}},{"value":"/ # The Book","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":1375,"byte_end":1389,"line_start":38,"line_end":38,"column_start":1,"column_end":15}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":1390,"byte_end":1393,"line_start":39,"line_end":39,"column_start":1,"column_end":4}},{"value":"/ For the user guide and further documentation, please read","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":1394,"byte_end":1455,"line_start":40,"line_end":40,"column_start":1,"column_end":62}},{"value":"/ [The Rust Rand Book](https://rust-random.github.io/book).","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":1456,"byte_end":1517,"line_start":41,"line_end":41,"column_start":1,"column_end":62}},{"value":"deny(missing_docs)","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":1733,"byte_end":1755,"line_start":48,"line_end":48,"column_start":1,"column_end":23}},{"value":"deny(missing_debug_implementations)","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":1756,"byte_end":1795,"line_start":49,"line_end":49,"column_start":1,"column_end":40}},{"value":"no_std","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":1857,"byte_end":1867,"line_start":51,"line_end":51,"column_start":1,"column_end":11}},{"value":"allow(clippy :: float_cmp, clippy :: neg_cmp_op_on_partial_ord,)","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":1965,"byte_end":2039,"line_start":54,"line_end":57,"column_start":1,"column_end":3}}]},{"kind":"Mod","id":{"krate":0,"index":24},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1},"name":"distributions","qualname":"::distributions","value":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","parent":null,"children":[{"krate":0,"index":25},{"krate":0,"index":50},{"krate":0,"index":98},{"krate":0,"index":119},{"krate":0,"index":169},{"krate":0,"index":226},{"krate":0,"index":246},{"krate":0,"index":283},{"krate":0,"index":328},{"krate":0,"index":332},{"krate":0,"index":462},{"krate":0,"index":485},{"krate":0,"index":486},{"krate":0,"index":489},{"krate":0,"index":492},{"krate":0,"index":493},{"krate":0,"index":496},{"krate":0,"index":499},{"krate":0,"index":502},{"krate":0,"index":505},{"krate":0,"index":506},{"krate":0,"index":507},{"krate":0,"index":509},{"krate":0,"index":510},{"krate":0,"index":512},{"krate":0,"index":513},{"krate":0,"index":515},{"krate":0,"index":518},{"krate":0,"index":521},{"krate":0,"index":522},{"krate":0,"index":525},{"krate":0,"index":528},{"krate":0,"index":2060},{"krate":0,"index":2062},{"krate":0,"index":2064},{"krate":0,"index":2065}],"decl_id":null,"docs":" Generating random samples from probability distributions","sig":null,"attributes":[{"value":"/ Generating random samples from probability distributions","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":7053,"byte_end":7113,"line_start":10,"line_end":10,"column_start":1,"column_end":61}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":7114,"byte_end":7117,"line_start":11,"line_end":11,"column_start":1,"column_end":4}},{"value":"/ This module is the home of the [`Distribution`] trait and several of its","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":7118,"byte_end":7194,"line_start":12,"line_end":12,"column_start":1,"column_end":77}},{"value":"/ implementations. It is the workhorse behind some of the convenient","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":7195,"byte_end":7265,"line_start":13,"line_end":13,"column_start":1,"column_end":71}},{"value":"/ functionality of the [`Rng`] trait, e.g. [`Rng::gen`] and of course","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":7266,"byte_end":7337,"line_start":14,"line_end":14,"column_start":1,"column_end":72}},{"value":"/ [`Rng::sample`].","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":7338,"byte_end":7358,"line_start":15,"line_end":15,"column_start":1,"column_end":21}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":7359,"byte_end":7362,"line_start":16,"line_end":16,"column_start":1,"column_end":4}},{"value":"/ Abstractly, a [probability distribution] describes the probability of","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":7363,"byte_end":7436,"line_start":17,"line_end":17,"column_start":1,"column_end":74}},{"value":"/ occurrence of each value in its sample space.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":7437,"byte_end":7486,"line_start":18,"line_end":18,"column_start":1,"column_end":50}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":7487,"byte_end":7490,"line_start":19,"line_end":19,"column_start":1,"column_end":4}},{"value":"/ More concretely, an implementation of `Distribution<T>` for type `X` is an","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":7491,"byte_end":7569,"line_start":20,"line_end":20,"column_start":1,"column_end":79}},{"value":"/ algorithm for choosing values from the sample space (a subset of `T`)","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":7570,"byte_end":7643,"line_start":21,"line_end":21,"column_start":1,"column_end":74}},{"value":"/ according to the distribution `X` represents, using an external source of","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":7644,"byte_end":7721,"line_start":22,"line_end":22,"column_start":1,"column_end":78}},{"value":"/ randomness (an RNG supplied to the `sample` function).","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":7722,"byte_end":7780,"line_start":23,"line_end":23,"column_start":1,"column_end":59}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":7781,"byte_end":7784,"line_start":24,"line_end":24,"column_start":1,"column_end":4}},{"value":"/ A type `X` may implement `Distribution<T>` for multiple types `T`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":7785,"byte_end":7855,"line_start":25,"line_end":25,"column_start":1,"column_end":71}},{"value":"/ Any type implementing [`Distribution`] is stateless (i.e. immutable),","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":7856,"byte_end":7929,"line_start":26,"line_end":26,"column_start":1,"column_end":74}},{"value":"/ but it may have internal parameters set at construction time (for example,","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":7930,"byte_end":8008,"line_start":27,"line_end":27,"column_start":1,"column_end":79}},{"value":"/ [`Uniform`] allows specification of its sample space as a range within `T`).","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":8009,"byte_end":8089,"line_start":28,"line_end":28,"column_start":1,"column_end":81}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":8090,"byte_end":8093,"line_start":29,"line_end":29,"column_start":1,"column_end":4}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":8094,"byte_end":8097,"line_start":30,"line_end":30,"column_start":1,"column_end":4}},{"value":"/ # The `Standard` distribution","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":8098,"byte_end":8131,"line_start":31,"line_end":31,"column_start":1,"column_end":34}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":8132,"byte_end":8135,"line_start":32,"line_end":32,"column_start":1,"column_end":4}},{"value":"/ The [`Standard`] distribution is important to mention. This is the","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":8136,"byte_end":8206,"line_start":33,"line_end":33,"column_start":1,"column_end":71}},{"value":"/ distribution used by [`Rng::gen`] and represents the \"default\" way to","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":8207,"byte_end":8280,"line_start":34,"line_end":34,"column_start":1,"column_end":74}},{"value":"/ produce a random value for many different types, including most primitive","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":8281,"byte_end":8358,"line_start":35,"line_end":35,"column_start":1,"column_end":78}},{"value":"/ types, tuples, arrays, and a few derived types. See the documentation of","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":8359,"byte_end":8435,"line_start":36,"line_end":36,"column_start":1,"column_end":77}},{"value":"/ [`Standard`] for more details.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":8436,"byte_end":8470,"line_start":37,"line_end":37,"column_start":1,"column_end":35}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":8471,"byte_end":8474,"line_start":38,"line_end":38,"column_start":1,"column_end":4}},{"value":"/ Implementing `Distribution<T>` for [`Standard`] for user types `T` makes it","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":8475,"byte_end":8554,"line_start":39,"line_end":39,"column_start":1,"column_end":80}},{"value":"/ possible to generate type `T` with [`Rng::gen`], and by extension also","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":8555,"byte_end":8629,"line_start":40,"line_end":40,"column_start":1,"column_end":75}},{"value":"/ with the [`random`] function.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":8630,"byte_end":8663,"line_start":41,"line_end":41,"column_start":1,"column_end":34}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":8664,"byte_end":8667,"line_start":42,"line_end":42,"column_start":1,"column_end":4}},{"value":"/ ## Random characters","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":8668,"byte_end":8692,"line_start":43,"line_end":43,"column_start":1,"column_end":25}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":8693,"byte_end":8696,"line_start":44,"line_end":44,"column_start":1,"column_end":4}},{"value":"/ [`Alphanumeric`] is a simple distribution to sample random letters and","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":8697,"byte_end":8771,"line_start":45,"line_end":45,"column_start":1,"column_end":75}},{"value":"/ numbers of the `char` type; in contrast [`Standard`] may sample any valid","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":8772,"byte_end":8849,"line_start":46,"line_end":46,"column_start":1,"column_end":78}},{"value":"/ `char`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":8850,"byte_end":8861,"line_start":47,"line_end":47,"column_start":1,"column_end":12}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":8862,"byte_end":8865,"line_start":48,"line_end":48,"column_start":1,"column_end":4}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":8866,"byte_end":8869,"line_start":49,"line_end":49,"column_start":1,"column_end":4}},{"value":"/ # Uniform numeric ranges","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":8870,"byte_end":8898,"line_start":50,"line_end":50,"column_start":1,"column_end":29}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":8899,"byte_end":8902,"line_start":51,"line_end":51,"column_start":1,"column_end":4}},{"value":"/ The [`Uniform`] distribution is more flexible than [`Standard`], but also","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":8903,"byte_end":8980,"line_start":52,"line_end":52,"column_start":1,"column_end":78}},{"value":"/ more specialised: it supports fewer target types, but allows the sample","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":8981,"byte_end":9056,"line_start":53,"line_end":53,"column_start":1,"column_end":76}},{"value":"/ space to be specified as an arbitrary range within its target type `T`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":9057,"byte_end":9132,"line_start":54,"line_end":54,"column_start":1,"column_end":76}},{"value":"/ Both [`Standard`] and [`Uniform`] are in some sense uniform distributions.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":9133,"byte_end":9211,"line_start":55,"line_end":55,"column_start":1,"column_end":79}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":9212,"byte_end":9215,"line_start":56,"line_end":56,"column_start":1,"column_end":4}},{"value":"/ Values may be sampled from this distribution using [`Rng::sample(Range)`] or","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":9216,"byte_end":9296,"line_start":57,"line_end":57,"column_start":1,"column_end":81}},{"value":"/ by creating a distribution object with [`Uniform::new`],","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":9297,"byte_end":9357,"line_start":58,"line_end":58,"column_start":1,"column_end":61}},{"value":"/ [`Uniform::new_inclusive`] or `From<Range>`. When the range limits are not","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":9358,"byte_end":9436,"line_start":59,"line_end":59,"column_start":1,"column_end":79}},{"value":"/ known at compile time it is typically faster to reuse an existing","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":9437,"byte_end":9506,"line_start":60,"line_end":60,"column_start":1,"column_end":70}},{"value":"/ `Uniform` object than to call [`Rng::sample(Range)`].","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":9507,"byte_end":9564,"line_start":61,"line_end":61,"column_start":1,"column_end":58}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":9565,"byte_end":9568,"line_start":62,"line_end":62,"column_start":1,"column_end":4}},{"value":"/ User types `T` may also implement `Distribution<T>` for [`Uniform`],","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":9569,"byte_end":9641,"line_start":63,"line_end":63,"column_start":1,"column_end":73}},{"value":"/ although this is less straightforward than for [`Standard`] (see the","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":9642,"byte_end":9714,"line_start":64,"line_end":64,"column_start":1,"column_end":73}},{"value":"/ documentation in the [`uniform`] module). Doing so enables generation of","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":9715,"byte_end":9791,"line_start":65,"line_end":65,"column_start":1,"column_end":77}},{"value":"/ values of type `T` with [`Rng::sample(Range)`].","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":9792,"byte_end":9844,"line_start":66,"line_end":66,"column_start":1,"column_end":53}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":9845,"byte_end":9848,"line_start":67,"line_end":67,"column_start":1,"column_end":4}},{"value":"/ ## Open and half-open ranges","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":9849,"byte_end":9881,"line_start":68,"line_end":68,"column_start":1,"column_end":33}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":9882,"byte_end":9885,"line_start":69,"line_end":69,"column_start":1,"column_end":4}},{"value":"/ There are surprisingly many ways to uniformly generate random floats. A","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":9886,"byte_end":9961,"line_start":70,"line_end":70,"column_start":1,"column_end":76}},{"value":"/ range between 0 and 1 is standard, but the exact bounds (open vs closed)","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":9962,"byte_end":10038,"line_start":71,"line_end":71,"column_start":1,"column_end":77}},{"value":"/ and accuracy differ. In addition to the [`Standard`] distribution Rand offers","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":10039,"byte_end":10120,"line_start":72,"line_end":72,"column_start":1,"column_end":82}},{"value":"/ [`Open01`] and [`OpenClosed01`]. See \"Floating point implementation\" section of","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":10121,"byte_end":10204,"line_start":73,"line_end":73,"column_start":1,"column_end":84}},{"value":"/ [`Standard`] documentation for more details.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":10205,"byte_end":10253,"line_start":74,"line_end":74,"column_start":1,"column_end":49}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":10254,"byte_end":10257,"line_start":75,"line_end":75,"column_start":1,"column_end":4}},{"value":"/ # Non-uniform sampling","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":10258,"byte_end":10284,"line_start":76,"line_end":76,"column_start":1,"column_end":27}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":10285,"byte_end":10288,"line_start":77,"line_end":77,"column_start":1,"column_end":4}},{"value":"/ Sampling a simple true/false outcome with a given probability has a name:","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":10289,"byte_end":10366,"line_start":78,"line_end":78,"column_start":1,"column_end":78}},{"value":"/ the [`Bernoulli`] distribution (this is used by [`Rng::gen_bool`]).","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":10367,"byte_end":10438,"line_start":79,"line_end":79,"column_start":1,"column_end":72}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":10439,"byte_end":10442,"line_start":80,"line_end":80,"column_start":1,"column_end":4}},{"value":"/ For weighted sampling from a sequence of discrete values, use the","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":10443,"byte_end":10512,"line_start":81,"line_end":81,"column_start":1,"column_end":70}},{"value":"/ [`WeightedIndex`] distribution.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":10513,"byte_end":10548,"line_start":82,"line_end":82,"column_start":1,"column_end":36}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":10549,"byte_end":10552,"line_start":83,"line_end":83,"column_start":1,"column_end":4}},{"value":"/ This crate no longer includes other non-uniform distributions; instead","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":10553,"byte_end":10627,"line_start":84,"line_end":84,"column_start":1,"column_end":75}},{"value":"/ it is recommended that you use either [`rand_distr`] or [`statrs`].","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":10628,"byte_end":10699,"line_start":85,"line_end":85,"column_start":1,"column_end":72}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":10700,"byte_end":10703,"line_start":86,"line_end":86,"column_start":1,"column_end":4}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":10704,"byte_end":10707,"line_start":87,"line_end":87,"column_start":1,"column_end":4}},{"value":"/ [probability distribution]: https://en.wikipedia.org/wiki/Probability_distribution","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":10708,"byte_end":10794,"line_start":88,"line_end":88,"column_start":1,"column_end":87}},{"value":"/ [`rand_distr`]: https://crates.io/crates/rand_distr","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":10795,"byte_end":10850,"line_start":89,"line_end":89,"column_start":1,"column_end":56}},{"value":"/ [`statrs`]: https://crates.io/crates/statrs","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":10851,"byte_end":10898,"line_start":90,"line_end":90,"column_start":1,"column_end":48}},{"value":"/ [`random`]: crate::random","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":10900,"byte_end":10929,"line_start":92,"line_end":92,"column_start":1,"column_end":30}},{"value":"/ [`rand_distr`]: https://crates.io/crates/rand_distr","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":10930,"byte_end":10985,"line_start":93,"line_end":93,"column_start":1,"column_end":56}},{"value":"/ [`statrs`]: https://crates.io/crates/statrs","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":10986,"byte_end":11033,"line_start":94,"line_end":94,"column_start":1,"column_end":48}}]},{"kind":"Struct","id":{"krate":0,"index":1122},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":16897,"byte_end":16906,"line_start":38,"line_end":38,"column_start":12,"column_end":21},"name":"Bernoulli","qualname":"::distributions::bernoulli::Bernoulli","value":"Bernoulli { }","parent":null,"children":[{"krate":0,"index":1123}],"decl_id":null,"docs":" The Bernoulli distribution.","sig":null,"attributes":[{"value":"/ The Bernoulli distribution.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":16244,"byte_end":16275,"line_start":17,"line_end":17,"column_start":1,"column_end":32}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":16276,"byte_end":16279,"line_start":18,"line_end":18,"column_start":1,"column_end":4}},{"value":"/ This is a special case of the Binomial distribution where `n = 1`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":16280,"byte_end":16350,"line_start":19,"line_end":19,"column_start":1,"column_end":71}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":16351,"byte_end":16354,"line_start":20,"line_end":20,"column_start":1,"column_end":4}},{"value":"/ # Example","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":16355,"byte_end":16368,"line_start":21,"line_end":21,"column_start":1,"column_end":14}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":16369,"byte_end":16372,"line_start":22,"line_end":22,"column_start":1,"column_end":4}},{"value":"/ ```rust","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":16373,"byte_end":16384,"line_start":23,"line_end":23,"column_start":1,"column_end":12}},{"value":"/ use rand::distributions::{Bernoulli, Distribution};","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":16385,"byte_end":16440,"line_start":24,"line_end":24,"column_start":1,"column_end":56}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":16441,"byte_end":16444,"line_start":25,"line_end":25,"column_start":1,"column_end":4}},{"value":"/ let d = Bernoulli::new(0.3).unwrap();","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":16445,"byte_end":16486,"line_start":26,"line_end":26,"column_start":1,"column_end":42}},{"value":"/ let v = d.sample(&mut rand::thread_rng());","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":16487,"byte_end":16533,"line_start":27,"line_end":27,"column_start":1,"column_end":47}},{"value":"/ println!(\"{} is from a Bernoulli distribution\", v);","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":16534,"byte_end":16589,"line_start":28,"line_end":28,"column_start":1,"column_end":56}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":16590,"byte_end":16597,"line_start":29,"line_end":29,"column_start":1,"column_end":8}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":16598,"byte_end":16601,"line_start":30,"line_end":30,"column_start":1,"column_end":4}},{"value":"/ # Precision","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":16602,"byte_end":16617,"line_start":31,"line_end":31,"column_start":1,"column_end":16}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":16618,"byte_end":16621,"line_start":32,"line_end":32,"column_start":1,"column_end":4}},{"value":"/ This `Bernoulli` distribution uses 64 bits from the RNG (a `u64`),","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":16622,"byte_end":16692,"line_start":33,"line_end":33,"column_start":1,"column_end":71}},{"value":"/ so only probabilities that are multiples of 2<sup>-64</sup> can be","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":16693,"byte_end":16763,"line_start":34,"line_end":34,"column_start":1,"column_end":71}},{"value":"/ represented.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":16764,"byte_end":16780,"line_start":35,"line_end":35,"column_start":1,"column_end":17}}]},{"kind":"TupleVariant","id":{"krate":0,"index":1134},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":18372,"byte_end":18390,"line_start":72,"line_end":72,"column_start":5,"column_end":23},"name":"InvalidProbability","qualname":"::distributions::bernoulli::BernoulliError::InvalidProbability","value":"BernoulliError::InvalidProbability","parent":{"krate":0,"index":1133},"children":[],"decl_id":null,"docs":" `p < 0` or `p > 1`.\n","sig":null,"attributes":[{"value":"/ `p < 0` or `p > 1`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":18344,"byte_end":18367,"line_start":71,"line_end":71,"column_start":5,"column_end":28}}]},{"kind":"Enum","id":{"krate":0,"index":1133},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":18323,"byte_end":18337,"line_start":70,"line_end":70,"column_start":10,"column_end":24},"name":"BernoulliError","qualname":"::distributions::bernoulli::BernoulliError","value":"pub enum BernoulliError { InvalidProbability, }","parent":null,"children":[{"krate":0,"index":1134}],"decl_id":null,"docs":" Error type returned from `Bernoulli::new`.\n","sig":null,"attributes":[{"value":"/ Error type returned from `Bernoulli::new`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":18222,"byte_end":18268,"line_start":68,"line_end":68,"column_start":1,"column_end":47}}]},{"kind":"Method","id":{"krate":0,"index":45},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":19261,"byte_end":19264,"line_start":98,"line_end":98,"column_start":12,"column_end":15},"name":"new","qualname":"<Bernoulli>::new","value":"pub fn new(f64) -> Result<Bernoulli, BernoulliError>","parent":null,"children":[],"decl_id":null,"docs":" Construct a new `Bernoulli` with the given probability of success `p`.","sig":null,"attributes":[{"value":"/ Construct a new `Bernoulli` with the given probability of success `p`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":18742,"byte_end":18816,"line_start":87,"line_end":87,"column_start":5,"column_end":79}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":18821,"byte_end":18824,"line_start":88,"line_end":88,"column_start":5,"column_end":8}},{"value":"/ # Precision","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":18829,"byte_end":18844,"line_start":89,"line_end":89,"column_start":5,"column_end":20}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":18849,"byte_end":18852,"line_start":90,"line_end":90,"column_start":5,"column_end":8}},{"value":"/ For `p = 1.0`, the resulting distribution will always generate true.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":18857,"byte_end":18929,"line_start":91,"line_end":91,"column_start":5,"column_end":77}},{"value":"/ For `p = 0.0`, the resulting distribution will always generate false.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":18934,"byte_end":19007,"line_start":92,"line_end":92,"column_start":5,"column_end":78}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":19012,"byte_end":19015,"line_start":93,"line_end":93,"column_start":5,"column_end":8}},{"value":"/ This method is accurate for any input `p` in the range `[0, 1]` which is","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":19020,"byte_end":19096,"line_start":94,"line_end":94,"column_start":5,"column_end":81}},{"value":"/ a multiple of 2<sup>-64</sup>. (Note that not all multiples of","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":19101,"byte_end":19167,"line_start":95,"line_end":95,"column_start":5,"column_end":71}},{"value":"/ 2<sup>-64</sup> in `[0, 1]` can be represented as a `f64`.)","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":19172,"byte_end":19235,"line_start":96,"line_end":96,"column_start":5,"column_end":68}},{"value":"inline","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":19240,"byte_end":19249,"line_start":97,"line_end":97,"column_start":5,"column_end":14}}]},{"kind":"Method","id":{"krate":0,"index":46},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":20147,"byte_end":20157,"line_start":119,"line_end":119,"column_start":12,"column_end":22},"name":"from_ratio","qualname":"<Bernoulli>::from_ratio","value":"pub fn from_ratio(u32, u32) -> Result<Bernoulli, BernoulliError>","parent":null,"children":[],"decl_id":null,"docs":" Construct a new `Bernoulli` with the probability of success of\n `numerator`-in-`denominator`. I.e. `new_ratio(2, 3)` will return\n a `Bernoulli` with a 2-in-3 chance, or about 67%, of returning `true`.","sig":null,"attributes":[{"value":"/ Construct a new `Bernoulli` with the probability of success of","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":19605,"byte_end":19671,"line_start":110,"line_end":110,"column_start":5,"column_end":71}},{"value":"/ `numerator`-in-`denominator`. I.e. `new_ratio(2, 3)` will return","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":19676,"byte_end":19744,"line_start":111,"line_end":111,"column_start":5,"column_end":73}},{"value":"/ a `Bernoulli` with a 2-in-3 chance, or about 67%, of returning `true`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":19749,"byte_end":19823,"line_start":112,"line_end":112,"column_start":5,"column_end":79}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":19828,"byte_end":19831,"line_start":113,"line_end":113,"column_start":5,"column_end":8}},{"value":"/ return `true`. If `numerator == 0` it will always return `false`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":19836,"byte_end":19905,"line_start":114,"line_end":114,"column_start":5,"column_end":74}},{"value":"/ For `numerator > denominator` and `denominator == 0`, this returns an","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":19910,"byte_end":19983,"line_start":115,"line_end":115,"column_start":5,"column_end":78}},{"value":"/ error. Otherwise, for `numerator == denominator`, samples are always","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":19988,"byte_end":20060,"line_start":116,"line_end":116,"column_start":5,"column_end":77}},{"value":"/ true; for `numerator == 0` samples are always false.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":20065,"byte_end":20121,"line_start":117,"line_end":117,"column_start":5,"column_end":61}},{"value":"inline","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":20126,"byte_end":20135,"line_start":118,"line_end":118,"column_start":5,"column_end":14}}]},{"kind":"Trait","id":{"krate":0,"index":60},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":24827,"byte_end":24839,"line_start":35,"line_end":35,"column_start":11,"column_end":23},"name":"Distribution","qualname":"::distributions::distribution::Distribution","value":"Distribution<T>","parent":null,"children":[{"krate":0,"index":62},{"krate":0,"index":64},{"krate":0,"index":66}],"decl_id":null,"docs":" Types (distributions) that can be used to create a random instance of `T`.","sig":null,"attributes":[{"value":"/ Types (distributions) that can be used to create a random instance of `T`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":23813,"byte_end":23891,"line_start":17,"line_end":17,"column_start":1,"column_end":79}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":23892,"byte_end":23895,"line_start":18,"line_end":18,"column_start":1,"column_end":4}},{"value":"/ It is possible to sample from a distribution through both the","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":23896,"byte_end":23961,"line_start":19,"line_end":19,"column_start":1,"column_end":66}},{"value":"/ `Distribution` and [`Rng`] traits, via `distr.sample(&mut rng)` and","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":23962,"byte_end":24033,"line_start":20,"line_end":20,"column_start":1,"column_end":72}},{"value":"/ `rng.sample(distr)`. They also both offer the [`sample_iter`] method, which","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":24034,"byte_end":24113,"line_start":21,"line_end":21,"column_start":1,"column_end":80}},{"value":"/ produces an iterator that samples from the distribution.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":24114,"byte_end":24174,"line_start":22,"line_end":22,"column_start":1,"column_end":61}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":24175,"byte_end":24178,"line_start":23,"line_end":23,"column_start":1,"column_end":4}},{"value":"/ All implementations are expected to be immutable; this has the significant","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":24179,"byte_end":24257,"line_start":24,"line_end":24,"column_start":1,"column_end":79}},{"value":"/ advantage of not needing to consider thread safety, and for most","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":24258,"byte_end":24326,"line_start":25,"line_end":25,"column_start":1,"column_end":69}},{"value":"/ distributions efficient state-less sampling algorithms are available.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":24327,"byte_end":24400,"line_start":26,"line_end":26,"column_start":1,"column_end":74}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":24401,"byte_end":24404,"line_start":27,"line_end":27,"column_start":1,"column_end":4}},{"value":"/ Implementations are typically expected to be portable with reproducible","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":24405,"byte_end":24480,"line_start":28,"line_end":28,"column_start":1,"column_end":76}},{"value":"/ results when used with a PRNG with fixed seed; see the","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":24481,"byte_end":24539,"line_start":29,"line_end":29,"column_start":1,"column_end":59}},{"value":"/ [portability chapter](https://rust-random.github.io/book/portability.html)","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":24540,"byte_end":24618,"line_start":30,"line_end":30,"column_start":1,"column_end":79}},{"value":"/ of The Rust Rand Book. In some cases this does not apply, e.g. the `usize`","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":24619,"byte_end":24697,"line_start":31,"line_end":31,"column_start":1,"column_end":79}},{"value":"/ type requires different sampling on 32-bit and 64-bit machines.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":24698,"byte_end":24765,"line_start":32,"line_end":32,"column_start":1,"column_end":68}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":24766,"byte_end":24769,"line_start":33,"line_end":33,"column_start":1,"column_end":4}},{"value":"/ [`sample_iter`]: Distribution::sample_iter","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":24770,"byte_end":24816,"line_start":34,"line_end":34,"column_start":1,"column_end":47}}]},{"kind":"Method","id":{"krate":0,"index":62},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":24933,"byte_end":24939,"line_start":37,"line_end":37,"column_start":8,"column_end":14},"name":"sample","qualname":"::distributions::distribution::Distribution::sample","value":"pub fn sample<R: Rng + ?Sized>(&Self, &mut R) -> T","parent":{"krate":0,"index":60},"children":[],"decl_id":null,"docs":" Generate a random value of `T`, using `rng` as the source of randomness.\n","sig":null,"attributes":[{"value":"/ Generate a random value of `T`, using `rng` as the source of randomness.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":24849,"byte_end":24925,"line_start":36,"line_end":36,"column_start":5,"column_end":81}}]},{"kind":"Method","id":{"krate":0,"index":64},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":26233,"byte_end":26244,"line_start":73,"line_end":73,"column_start":8,"column_end":19},"name":"sample_iter","qualname":"::distributions::distribution::Distribution::sample_iter","value":"pub fn sample_iter<R>(Self, R) -> DistIter<Self, R, T> where R: Rng,\nSelf: Sized","parent":{"krate":0,"index":60},"children":[],"decl_id":null,"docs":" Create an iterator that generates random values of `T`, using `rng` as\n the source of randomness.","sig":null,"attributes":[{"value":"/ Create an iterator that generates random values of `T`, using `rng` as","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":24988,"byte_end":25062,"line_start":39,"line_end":39,"column_start":5,"column_end":79}},{"value":"/ the source of randomness.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":25067,"byte_end":25096,"line_start":40,"line_end":40,"column_start":5,"column_end":34}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":25101,"byte_end":25104,"line_start":41,"line_end":41,"column_start":5,"column_end":8}},{"value":"/ Note that this function takes `self` by value. This works since","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":25109,"byte_end":25176,"line_start":42,"line_end":42,"column_start":5,"column_end":72}},{"value":"/ `Distribution<T>` is impl'd for `&D` where `D: Distribution<T>`,","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":25181,"byte_end":25249,"line_start":43,"line_end":43,"column_start":5,"column_end":73}},{"value":"/ however borrowing is not automatic hence `distr.sample_iter(...)` may","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":25254,"byte_end":25327,"line_start":44,"line_end":44,"column_start":5,"column_end":78}},{"value":"/ need to be replaced with `(&distr).sample_iter(...)` to borrow or","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":25332,"byte_end":25401,"line_start":45,"line_end":45,"column_start":5,"column_end":74}},{"value":"/ `(&*distr).sample_iter(...)` to reborrow an existing reference.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":25406,"byte_end":25473,"line_start":46,"line_end":46,"column_start":5,"column_end":72}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":25478,"byte_end":25481,"line_start":47,"line_end":47,"column_start":5,"column_end":8}},{"value":"/ # Example","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":25486,"byte_end":25499,"line_start":48,"line_end":48,"column_start":5,"column_end":18}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":25504,"byte_end":25507,"line_start":49,"line_end":49,"column_start":5,"column_end":8}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":25512,"byte_end":25519,"line_start":50,"line_end":50,"column_start":5,"column_end":12}},{"value":"/ use rand::thread_rng;","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":25524,"byte_end":25549,"line_start":51,"line_end":51,"column_start":5,"column_end":30}},{"value":"/ use rand::distributions::{Distribution, Alphanumeric, Uniform, Standard};","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":25554,"byte_end":25631,"line_start":52,"line_end":52,"column_start":5,"column_end":82}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":25636,"byte_end":25639,"line_start":53,"line_end":53,"column_start":5,"column_end":8}},{"value":"/ let mut rng = thread_rng();","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":25644,"byte_end":25675,"line_start":54,"line_end":54,"column_start":5,"column_end":36}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":25680,"byte_end":25683,"line_start":55,"line_end":55,"column_start":5,"column_end":8}},{"value":"/ // Vec of 16 x f32:","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":25688,"byte_end":25711,"line_start":56,"line_end":56,"column_start":5,"column_end":28}},{"value":"/ let v: Vec<f32> = Standard.sample_iter(&mut rng).take(16).collect();","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":25716,"byte_end":25788,"line_start":57,"line_end":57,"column_start":5,"column_end":77}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":25793,"byte_end":25796,"line_start":58,"line_end":58,"column_start":5,"column_end":8}},{"value":"/ // String:","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":25801,"byte_end":25815,"line_start":59,"line_end":59,"column_start":5,"column_end":19}},{"value":"/ let s: String = Alphanumeric","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":25820,"byte_end":25852,"line_start":60,"line_end":60,"column_start":5,"column_end":37}},{"value":"/ .sample_iter(&mut rng)","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":25857,"byte_end":25887,"line_start":61,"line_end":61,"column_start":5,"column_end":35}},{"value":"/ .take(7)","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":25892,"byte_end":25908,"line_start":62,"line_end":62,"column_start":5,"column_end":21}},{"value":"/ .map(char::from)","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":25913,"byte_end":25937,"line_start":63,"line_end":63,"column_start":5,"column_end":29}},{"value":"/ .collect();","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":25942,"byte_end":25961,"line_start":64,"line_end":64,"column_start":5,"column_end":24}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":25966,"byte_end":25969,"line_start":65,"line_end":65,"column_start":5,"column_end":8}},{"value":"/ // Dice-rolling:","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":25974,"byte_end":25994,"line_start":66,"line_end":66,"column_start":5,"column_end":25}},{"value":"/ let die_range = Uniform::new_inclusive(1, 6);","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":25999,"byte_end":26048,"line_start":67,"line_end":67,"column_start":5,"column_end":54}},{"value":"/ let mut roll_die = die_range.sample_iter(&mut rng);","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":26053,"byte_end":26108,"line_start":68,"line_end":68,"column_start":5,"column_end":60}},{"value":"/ while roll_die.next().unwrap() != 6 {","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":26113,"byte_end":26154,"line_start":69,"line_end":69,"column_start":5,"column_end":46}},{"value":"/ println!(\"Not a 6; rolling again!\");","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":26159,"byte_end":26203,"line_start":70,"line_end":70,"column_start":5,"column_end":49}},{"value":"/ }","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":26208,"byte_end":26213,"line_start":71,"line_end":71,"column_start":5,"column_end":10}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":26218,"byte_end":26225,"line_start":72,"line_end":72,"column_start":5,"column_end":12}}]},{"kind":"Method","id":{"krate":0,"index":66},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":26993,"byte_end":26996,"line_start":102,"line_end":102,"column_start":8,"column_end":11},"name":"map","qualname":"::distributions::distribution::Distribution::map","value":"pub fn map<F, S>(Self, F) -> DistMap<Self, F, T, S> where F: Fn(T) -> S,\nSelf: Sized","parent":{"krate":0,"index":60},"children":[],"decl_id":null,"docs":" Create a distribution of values of 'S' by mapping the output of `Self`\n through the closure `F`","sig":null,"attributes":[{"value":"/ Create a distribution of values of 'S' by mapping the output of `Self`","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":26471,"byte_end":26545,"line_start":85,"line_end":85,"column_start":5,"column_end":79}},{"value":"/ through the closure `F`","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":26550,"byte_end":26577,"line_start":86,"line_end":86,"column_start":5,"column_end":32}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":26582,"byte_end":26585,"line_start":87,"line_end":87,"column_start":5,"column_end":8}},{"value":"/ # Example","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":26590,"byte_end":26603,"line_start":88,"line_end":88,"column_start":5,"column_end":18}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":26608,"byte_end":26611,"line_start":89,"line_end":89,"column_start":5,"column_end":8}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":26616,"byte_end":26623,"line_start":90,"line_end":90,"column_start":5,"column_end":12}},{"value":"/ use rand::thread_rng;","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":26628,"byte_end":26653,"line_start":91,"line_end":91,"column_start":5,"column_end":30}},{"value":"/ use rand::distributions::{Distribution, Uniform};","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":26658,"byte_end":26711,"line_start":92,"line_end":92,"column_start":5,"column_end":58}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":26716,"byte_end":26719,"line_start":93,"line_end":93,"column_start":5,"column_end":8}},{"value":"/ let mut rng = thread_rng();","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":26724,"byte_end":26755,"line_start":94,"line_end":94,"column_start":5,"column_end":36}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":26760,"byte_end":26763,"line_start":95,"line_end":95,"column_start":5,"column_end":8}},{"value":"/ let die = Uniform::new_inclusive(1, 6);","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":26768,"byte_end":26811,"line_start":96,"line_end":96,"column_start":5,"column_end":48}},{"value":"/ let even_number = die.map(|num| num % 2 == 0);","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":26816,"byte_end":26866,"line_start":97,"line_end":97,"column_start":5,"column_end":55}},{"value":"/ while !even_number.sample(&mut rng) {","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":26871,"byte_end":26912,"line_start":98,"line_end":98,"column_start":5,"column_end":46}},{"value":"/ println!(\"Still odd; rolling again!\");","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":26917,"byte_end":26963,"line_start":99,"line_end":99,"column_start":5,"column_end":51}},{"value":"/ }","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":26968,"byte_end":26973,"line_start":100,"line_end":100,"column_start":5,"column_end":10}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":26978,"byte_end":26985,"line_start":101,"line_end":101,"column_start":5,"column_end":12}}]},{"kind":"Struct","id":{"krate":0,"index":1147},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":27706,"byte_end":27714,"line_start":129,"line_end":129,"column_start":12,"column_end":20},"name":"DistIter","qualname":"::distributions::distribution::DistIter","value":"DistIter { }","parent":null,"children":[{"krate":0,"index":1151},{"krate":0,"index":1152},{"krate":0,"index":1153}],"decl_id":null,"docs":" An iterator that generates random values of `T` with distribution `D`,\n using `R` as the source of randomness.","sig":null,"attributes":[{"value":"/ An iterator that generates random values of `T` with distribution `D`,","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":27389,"byte_end":27463,"line_start":121,"line_end":121,"column_start":1,"column_end":75}},{"value":"/ using `R` as the source of randomness.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":27464,"byte_end":27506,"line_start":122,"line_end":122,"column_start":1,"column_end":43}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":27507,"byte_end":27510,"line_start":123,"line_end":123,"column_start":1,"column_end":4}},{"value":"/ This `struct` is created by the [`sample_iter`] method on [`Distribution`].","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":27511,"byte_end":27590,"line_start":124,"line_end":124,"column_start":1,"column_end":80}},{"value":"/ See its documentation for more.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":27591,"byte_end":27626,"line_start":125,"line_end":125,"column_start":1,"column_end":36}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":27627,"byte_end":27630,"line_start":126,"line_end":126,"column_start":1,"column_end":4}},{"value":"/ [`sample_iter`]: Distribution::sample_iter","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":27631,"byte_end":27677,"line_start":127,"line_end":127,"column_start":1,"column_end":47}}]},{"kind":"Struct","id":{"krate":0,"index":1159},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":28869,"byte_end":28876,"line_start":176,"line_end":176,"column_start":12,"column_end":19},"name":"DistMap","qualname":"::distributions::distribution::DistMap","value":"DistMap { }","parent":null,"children":[{"krate":0,"index":1164},{"krate":0,"index":1165},{"krate":0,"index":1166}],"decl_id":null,"docs":" A distribution of values of type `S` derived from the distribution `D`\n by mapping its output of type `T` through the closure `F`.","sig":null,"attributes":[{"value":"/ A distribution of values of type `S` derived from the distribution `D`","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":28597,"byte_end":28671,"line_start":170,"line_end":170,"column_start":1,"column_end":75}},{"value":"/ by mapping its output of type `T` through the closure `F`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":28672,"byte_end":28734,"line_start":171,"line_end":171,"column_start":1,"column_end":63}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":28735,"byte_end":28738,"line_start":172,"line_end":172,"column_start":1,"column_end":4}},{"value":"/ This `struct` is created by the [`Distribution::map`] method.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":28739,"byte_end":28804,"line_start":173,"line_end":173,"column_start":1,"column_end":66}},{"value":"/ See its documentation for more.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":28805,"byte_end":28840,"line_start":174,"line_end":174,"column_start":1,"column_end":36}}]},{"kind":"Trait","id":{"krate":0,"index":93},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":29395,"byte_end":29405,"line_start":197,"line_end":197,"column_start":11,"column_end":21},"name":"DistString","qualname":"::distributions::distribution::DistString","value":"DistString","parent":null,"children":[{"krate":0,"index":94},{"krate":0,"index":96}],"decl_id":null,"docs":" `String` sampler","sig":null,"attributes":[{"value":"/ `String` sampler","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":29194,"byte_end":29214,"line_start":192,"line_end":192,"column_start":1,"column_end":21}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":29215,"byte_end":29218,"line_start":193,"line_end":193,"column_start":1,"column_end":4}},{"value":"/ Sampling a `String` of random characters is not quite the same as collecting","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":29219,"byte_end":29299,"line_start":194,"line_end":194,"column_start":1,"column_end":81}},{"value":"/ a sequence of chars. This trait contains some helpers.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":29300,"byte_end":29358,"line_start":195,"line_end":195,"column_start":1,"column_end":59}},{"value":"cfg(feature = \"alloc\")","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":29359,"byte_end":29384,"line_start":196,"line_end":196,"column_start":1,"column_end":26}}]},{"kind":"Method","id":{"krate":0,"index":94},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":29461,"byte_end":29474,"line_start":199,"line_end":199,"column_start":8,"column_end":21},"name":"append_string","qualname":"::distributions::distribution::DistString::append_string","value":"pub fn append_string<R: Rng + ?Sized>(&Self, &mut R, &mut String, usize)","parent":{"krate":0,"index":93},"children":[],"decl_id":null,"docs":" Append `len` random chars to `string`\n","sig":null,"attributes":[{"value":"/ Append `len` random chars to `string`","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":29412,"byte_end":29453,"line_start":198,"line_end":198,"column_start":5,"column_end":46}}]},{"kind":"Method","id":{"krate":0,"index":96},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":29618,"byte_end":29631,"line_start":203,"line_end":203,"column_start":8,"column_end":21},"name":"sample_string","qualname":"::distributions::distribution::DistString::sample_string","value":"pub fn sample_string<R: Rng + ?Sized>(&Self, &mut R, usize) -> String","parent":{"krate":0,"index":93},"children":[],"decl_id":null,"docs":" Generate a `String` of `len` random chars\n","sig":null,"attributes":[{"value":"/ Generate a `String` of `len` random chars","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":29551,"byte_end":29596,"line_start":201,"line_end":201,"column_start":5,"column_end":50}},{"value":"inline","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":29601,"byte_end":29610,"line_start":202,"line_end":202,"column_start":5,"column_end":14}}]},{"kind":"Struct","id":{"krate":0,"index":1173},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":33333,"byte_end":33345,"line_start":46,"line_end":46,"column_start":12,"column_end":24},"name":"OpenClosed01","qualname":"::distributions::float::OpenClosed01","value":"","parent":null,"children":[],"decl_id":null,"docs":" A distribution to sample floating point numbers uniformly in the half-open\n interval `(0, 1]`, i.e. including 1 but not 0.","sig":null,"attributes":[{"value":"/ A distribution to sample floating point numbers uniformly in the half-open","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":32316,"byte_end":32394,"line_start":20,"line_end":20,"column_start":1,"column_end":79}},{"value":"/ interval `(0, 1]`, i.e. including 1 but not 0.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":32395,"byte_end":32445,"line_start":21,"line_end":21,"column_start":1,"column_end":51}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":32446,"byte_end":32449,"line_start":22,"line_end":22,"column_start":1,"column_end":4}},{"value":"/ All values that can be generated are of the form `n * ε/2`. For `f32`","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":32450,"byte_end":32524,"line_start":23,"line_end":23,"column_start":1,"column_end":74}},{"value":"/ the 24 most significant random bits of a `u32` are used and for `f64` the","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":32525,"byte_end":32602,"line_start":24,"line_end":24,"column_start":1,"column_end":78}},{"value":"/ 53 most significant bits of a `u64` are used. The conversion uses the","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":32603,"byte_end":32676,"line_start":25,"line_end":25,"column_start":1,"column_end":74}},{"value":"/ multiplicative method.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":32677,"byte_end":32703,"line_start":26,"line_end":26,"column_start":1,"column_end":27}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":32704,"byte_end":32707,"line_start":27,"line_end":27,"column_start":1,"column_end":4}},{"value":"/ See also: [`Standard`] which samples from `[0, 1)`, [`Open01`]","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":32708,"byte_end":32774,"line_start":28,"line_end":28,"column_start":1,"column_end":67}},{"value":"/ which samples from `(0, 1)` and [`Uniform`] which samples from arbitrary","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":32775,"byte_end":32851,"line_start":29,"line_end":29,"column_start":1,"column_end":77}},{"value":"/ ranges.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":32852,"byte_end":32863,"line_start":30,"line_end":30,"column_start":1,"column_end":12}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":32864,"byte_end":32867,"line_start":31,"line_end":31,"column_start":1,"column_end":4}},{"value":"/ # Example","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":32868,"byte_end":32881,"line_start":32,"line_end":32,"column_start":1,"column_end":14}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":32882,"byte_end":32889,"line_start":33,"line_end":33,"column_start":1,"column_end":8}},{"value":"/ use rand::{thread_rng, Rng};","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":32890,"byte_end":32922,"line_start":34,"line_end":34,"column_start":1,"column_end":33}},{"value":"/ use rand::distributions::OpenClosed01;","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":32923,"byte_end":32965,"line_start":35,"line_end":35,"column_start":1,"column_end":43}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":32966,"byte_end":32969,"line_start":36,"line_end":36,"column_start":1,"column_end":4}},{"value":"/ let val: f32 = thread_rng().sample(OpenClosed01);","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":32970,"byte_end":33023,"line_start":37,"line_end":37,"column_start":1,"column_end":54}},{"value":"/ println!(\"f32 from (0, 1): {}\", val);","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":33024,"byte_end":33065,"line_start":38,"line_end":38,"column_start":1,"column_end":42}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":33066,"byte_end":33073,"line_start":39,"line_end":39,"column_start":1,"column_end":8}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":33074,"byte_end":33077,"line_start":40,"line_end":40,"column_start":1,"column_end":4}},{"value":"/ [`Standard`]: crate::distributions::Standard","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":33078,"byte_end":33126,"line_start":41,"line_end":41,"column_start":1,"column_end":49}},{"value":"/ [`Open01`]: crate::distributions::Open01","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":33127,"byte_end":33171,"line_start":42,"line_end":42,"column_start":1,"column_end":45}},{"value":"/ [`Uniform`]: crate::distributions::uniform::Uniform","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":33172,"byte_end":33227,"line_start":43,"line_end":43,"column_start":1,"column_end":56}}]},{"kind":"Struct","id":{"krate":0,"index":1180},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":34340,"byte_end":34346,"line_start":73,"line_end":73,"column_start":12,"column_end":18},"name":"Open01","qualname":"::distributions::float::Open01","value":"","parent":null,"children":[],"decl_id":null,"docs":" A distribution to sample floating point numbers uniformly in the open\n interval `(0, 1)`, i.e. not including either endpoint.","sig":null,"attributes":[{"value":"/ A distribution to sample floating point numbers uniformly in the open","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":33348,"byte_end":33421,"line_start":48,"line_end":48,"column_start":1,"column_end":74}},{"value":"/ interval `(0, 1)`, i.e. not including either endpoint.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":33422,"byte_end":33480,"line_start":49,"line_end":49,"column_start":1,"column_end":59}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":33481,"byte_end":33484,"line_start":50,"line_end":50,"column_start":1,"column_end":4}},{"value":"/ All values that can be generated are of the form `n * ε + ε/2`. For `f32`","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":33485,"byte_end":33564,"line_start":51,"line_end":51,"column_start":1,"column_end":78}},{"value":"/ the 23 most significant random bits of an `u32` are used, for `f64` 52 from","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":33565,"byte_end":33644,"line_start":52,"line_end":52,"column_start":1,"column_end":80}},{"value":"/ an `u64`. The conversion uses a transmute-based method.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":33645,"byte_end":33704,"line_start":53,"line_end":53,"column_start":1,"column_end":60}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":33705,"byte_end":33708,"line_start":54,"line_end":54,"column_start":1,"column_end":4}},{"value":"/ See also: [`Standard`] which samples from `[0, 1)`, [`OpenClosed01`]","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":33709,"byte_end":33781,"line_start":55,"line_end":55,"column_start":1,"column_end":73}},{"value":"/ which samples from `(0, 1]` and [`Uniform`] which samples from arbitrary","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":33782,"byte_end":33858,"line_start":56,"line_end":56,"column_start":1,"column_end":77}},{"value":"/ ranges.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":33859,"byte_end":33870,"line_start":57,"line_end":57,"column_start":1,"column_end":12}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":33871,"byte_end":33874,"line_start":58,"line_end":58,"column_start":1,"column_end":4}},{"value":"/ # Example","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":33875,"byte_end":33888,"line_start":59,"line_end":59,"column_start":1,"column_end":14}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":33889,"byte_end":33896,"line_start":60,"line_end":60,"column_start":1,"column_end":8}},{"value":"/ use rand::{thread_rng, Rng};","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":33897,"byte_end":33929,"line_start":61,"line_end":61,"column_start":1,"column_end":33}},{"value":"/ use rand::distributions::Open01;","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":33930,"byte_end":33966,"line_start":62,"line_end":62,"column_start":1,"column_end":37}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":33967,"byte_end":33970,"line_start":63,"line_end":63,"column_start":1,"column_end":4}},{"value":"/ let val: f32 = thread_rng().sample(Open01);","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":33971,"byte_end":34018,"line_start":64,"line_end":64,"column_start":1,"column_end":48}},{"value":"/ println!(\"f32 from (0, 1): {}\", val);","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":34019,"byte_end":34060,"line_start":65,"line_end":65,"column_start":1,"column_end":42}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":34061,"byte_end":34068,"line_start":66,"line_end":66,"column_start":1,"column_end":8}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":34069,"byte_end":34072,"line_start":67,"line_end":67,"column_start":1,"column_end":4}},{"value":"/ [`Standard`]: crate::distributions::Standard","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":34073,"byte_end":34121,"line_start":68,"line_end":68,"column_start":1,"column_end":49}},{"value":"/ [`OpenClosed01`]: crate::distributions::OpenClosed01","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":34122,"byte_end":34178,"line_start":69,"line_end":69,"column_start":1,"column_end":57}},{"value":"/ [`Uniform`]: crate::distributions::uniform::Uniform","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":34179,"byte_end":34234,"line_start":70,"line_end":70,"column_start":1,"column_end":56}}]},{"kind":"Trait","id":{"krate":0,"index":115},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":34456,"byte_end":34465,"line_start":78,"line_end":78,"column_start":11,"column_end":20},"name":"IntoFloat","qualname":"::distributions::float::IntoFloat","value":"IntoFloat","parent":null,"children":[{"krate":0,"index":116},{"krate":0,"index":117}],"decl_id":null,"docs":"","sig":null,"attributes":[]},{"kind":"Type","id":{"krate":0,"index":116},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":34477,"byte_end":34478,"line_start":79,"line_end":79,"column_start":10,"column_end":11},"name":"F","qualname":"::distributions::float::IntoFloat::F","value":"type F;","parent":{"krate":0,"index":115},"children":[],"decl_id":null,"docs":"","sig":null,"attributes":[]},{"kind":"Method","id":{"krate":0,"index":117},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":34881,"byte_end":34905,"line_start":89,"line_end":89,"column_start":8,"column_end":32},"name":"into_float_with_exponent","qualname":"::distributions::float::IntoFloat::into_float_with_exponent","value":"pub fn into_float_with_exponent(Self, i32) -> Self::F","parent":{"krate":0,"index":115},"children":[],"decl_id":null,"docs":" Helper method to combine the fraction and a constant exponent into a\n float.","sig":null,"attributes":[{"value":"/ Helper method to combine the fraction and a constant exponent into a","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":34485,"byte_end":34557,"line_start":81,"line_end":81,"column_start":5,"column_end":77}},{"value":"/ float.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":34562,"byte_end":34572,"line_start":82,"line_end":82,"column_start":5,"column_end":15}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":34577,"byte_end":34580,"line_start":83,"line_end":83,"column_start":5,"column_end":8}},{"value":"/ Only the least significant bits of `self` may be set, 23 for `f32` and","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":34585,"byte_end":34659,"line_start":84,"line_end":84,"column_start":5,"column_end":79}},{"value":"/ 52 for `f64`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":34664,"byte_end":34681,"line_start":85,"line_end":85,"column_start":5,"column_end":22}},{"value":"/ The resulting value will fall in a range that depends on the exponent.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":34686,"byte_end":34760,"line_start":86,"line_end":86,"column_start":5,"column_end":79}},{"value":"/ As an example the range with exponent 0 will be","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":34765,"byte_end":34816,"line_start":87,"line_end":87,"column_start":5,"column_end":56}},{"value":"/ [2<sup>0</sup>..2<sup>1</sup>), which is [1..2).","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/float.rs","byte_start":34821,"byte_end":34873,"line_start":88,"line_end":88,"column_start":5,"column_end":57}}]},{"kind":"Struct","id":{"krate":0,"index":1253},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":55581,"byte_end":55593,"line_start":69,"line_end":69,"column_start":12,"column_end":24},"name":"Alphanumeric","qualname":"::distributions::other::Alphanumeric","value":"","parent":null,"children":[],"decl_id":null,"docs":" Sample a `u8`, uniformly distributed over ASCII letters and numbers:\n a-z, A-Z and 0-9.","sig":null,"attributes":[{"value":"/ Sample a `u8`, uniformly distributed over ASCII letters and numbers:","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":53890,"byte_end":53962,"line_start":29,"line_end":29,"column_start":1,"column_end":73}},{"value":"/ a-z, A-Z and 0-9.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":53963,"byte_end":53984,"line_start":30,"line_end":30,"column_start":1,"column_end":22}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":53985,"byte_end":53988,"line_start":31,"line_end":31,"column_start":1,"column_end":4}},{"value":"/ # Example","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":53989,"byte_end":54002,"line_start":32,"line_end":32,"column_start":1,"column_end":14}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":54003,"byte_end":54006,"line_start":33,"line_end":33,"column_start":1,"column_end":4}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":54007,"byte_end":54014,"line_start":34,"line_end":34,"column_start":1,"column_end":8}},{"value":"/ use rand::{Rng, thread_rng};","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":54015,"byte_end":54047,"line_start":35,"line_end":35,"column_start":1,"column_end":33}},{"value":"/ use rand::distributions::Alphanumeric;","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":54048,"byte_end":54090,"line_start":36,"line_end":36,"column_start":1,"column_end":43}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":54091,"byte_end":54094,"line_start":37,"line_end":37,"column_start":1,"column_end":4}},{"value":"/ let mut rng = thread_rng();","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":54095,"byte_end":54126,"line_start":38,"line_end":38,"column_start":1,"column_end":32}},{"value":"/ let chars: String = (0..7).map(|_| rng.sample(Alphanumeric) as char).collect();","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":54127,"byte_end":54210,"line_start":39,"line_end":39,"column_start":1,"column_end":84}},{"value":"/ println!(\"Random chars: {}\", chars);","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":54211,"byte_end":54251,"line_start":40,"line_end":40,"column_start":1,"column_end":41}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":54252,"byte_end":54259,"line_start":41,"line_end":41,"column_start":1,"column_end":8}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":54260,"byte_end":54263,"line_start":42,"line_end":42,"column_start":1,"column_end":4}},{"value":"/ The [`DistString`] trait provides an easier method of generating","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":54264,"byte_end":54332,"line_start":43,"line_end":43,"column_start":1,"column_end":69}},{"value":"/ a random `String`, and offers more efficient allocation:","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":54333,"byte_end":54393,"line_start":44,"line_end":44,"column_start":1,"column_end":61}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":54394,"byte_end":54401,"line_start":45,"line_end":45,"column_start":1,"column_end":8}},{"value":"/ use rand::distributions::{Alphanumeric, DistString};","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":54402,"byte_end":54458,"line_start":46,"line_end":46,"column_start":1,"column_end":57}},{"value":"/ let string = Alphanumeric.sample_string(&mut rand::thread_rng(), 16);","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":54459,"byte_end":54532,"line_start":47,"line_end":47,"column_start":1,"column_end":74}},{"value":"/ println!(\"Random string: {}\", string);","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":54533,"byte_end":54575,"line_start":48,"line_end":48,"column_start":1,"column_end":43}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":54576,"byte_end":54583,"line_start":49,"line_end":49,"column_start":1,"column_end":8}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":54584,"byte_end":54587,"line_start":50,"line_end":50,"column_start":1,"column_end":4}},{"value":"/ # Passwords","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":54588,"byte_end":54603,"line_start":51,"line_end":51,"column_start":1,"column_end":16}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":54604,"byte_end":54607,"line_start":52,"line_end":52,"column_start":1,"column_end":4}},{"value":"/ Users sometimes ask whether it is safe to use a string of random characters","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":54608,"byte_end":54687,"line_start":53,"line_end":53,"column_start":1,"column_end":80}},{"value":"/ as a password. In principle, all RNGs in Rand implementing `CryptoRng` are","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":54688,"byte_end":54766,"line_start":54,"line_end":54,"column_start":1,"column_end":79}},{"value":"/ suitable as a source of randomness for generating passwords (if they are","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":54767,"byte_end":54843,"line_start":55,"line_end":55,"column_start":1,"column_end":77}},{"value":"/ properly seeded), but it is more conservative to only use randomness","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":54844,"byte_end":54916,"line_start":56,"line_end":56,"column_start":1,"column_end":73}},{"value":"/ directly from the operating system via the `getrandom` crate, or the","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":54917,"byte_end":54989,"line_start":57,"line_end":57,"column_start":1,"column_end":73}},{"value":"/ corresponding bindings of a crypto library.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":54990,"byte_end":55037,"line_start":58,"line_end":58,"column_start":1,"column_end":48}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":55038,"byte_end":55041,"line_start":59,"line_end":59,"column_start":1,"column_end":4}},{"value":"/ When generating passwords or keys, it is important to consider the threat","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":55042,"byte_end":55119,"line_start":60,"line_end":60,"column_start":1,"column_end":78}},{"value":"/ model and in some cases the memorability of the password. This is out of","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":55120,"byte_end":55196,"line_start":61,"line_end":61,"column_start":1,"column_end":77}},{"value":"/ scope of the Rand project, and therefore we defer to the following","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":55197,"byte_end":55267,"line_start":62,"line_end":62,"column_start":1,"column_end":71}},{"value":"/ references:","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":55268,"byte_end":55283,"line_start":63,"line_end":63,"column_start":1,"column_end":16}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":55284,"byte_end":55287,"line_start":64,"line_end":64,"column_start":1,"column_end":4}},{"value":"/ - [Wikipedia article on Password Strength](https://en.wikipedia.org/wiki/Password_strength)","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":55288,"byte_end":55383,"line_start":65,"line_end":65,"column_start":1,"column_end":96}},{"value":"/ - [Diceware for generating memorable passwords](https://en.wikipedia.org/wiki/Diceware)","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":55384,"byte_end":55475,"line_start":66,"line_end":66,"column_start":1,"column_end":92}}]},{"kind":"Struct","id":{"krate":0,"index":1572},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":67266,"byte_end":67271,"line_start":65,"line_end":65,"column_start":12,"column_end":17},"name":"Slice","qualname":"::distributions::slice::Slice","value":"Slice { }","parent":null,"children":[{"krate":0,"index":1575},{"krate":0,"index":1576}],"decl_id":null,"docs":" A distribution to sample items uniformly from a slice.","sig":null,"attributes":[{"value":"/ A distribution to sample items uniformly from a slice.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":65301,"byte_end":65359,"line_start":11,"line_end":11,"column_start":1,"column_end":59}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":65360,"byte_end":65363,"line_start":12,"line_end":12,"column_start":1,"column_end":4}},{"value":"/ [`Slice::new`] constructs a distribution referencing a slice and uniformly","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":65364,"byte_end":65442,"line_start":13,"line_end":13,"column_start":1,"column_end":79}},{"value":"/ samples references from the items in the slice. It may do extra work up","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":65443,"byte_end":65518,"line_start":14,"line_end":14,"column_start":1,"column_end":76}},{"value":"/ front to make sampling of multiple values faster; if only one sample from","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":65519,"byte_end":65596,"line_start":15,"line_end":15,"column_start":1,"column_end":78}},{"value":"/ the slice is required, [`SliceRandom::choose`] can be more efficient.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":65597,"byte_end":65670,"line_start":16,"line_end":16,"column_start":1,"column_end":74}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":65671,"byte_end":65674,"line_start":17,"line_end":17,"column_start":1,"column_end":4}},{"value":"/ Steps are taken to avoid bias which might be present in naive","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":65675,"byte_end":65740,"line_start":18,"line_end":18,"column_start":1,"column_end":66}},{"value":"/ implementations; for example `slice[rng.gen() % slice.len()]` samples from","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":65741,"byte_end":65819,"line_start":19,"line_end":19,"column_start":1,"column_end":79}},{"value":"/ the slice, but may be more likely to select numbers in the low range than","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":65820,"byte_end":65897,"line_start":20,"line_end":20,"column_start":1,"column_end":78}},{"value":"/ other values.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":65898,"byte_end":65915,"line_start":21,"line_end":21,"column_start":1,"column_end":18}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":65916,"byte_end":65919,"line_start":22,"line_end":22,"column_start":1,"column_end":4}},{"value":"/ This distribution samples with replacement; each sample is independent.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":65920,"byte_end":65995,"line_start":23,"line_end":23,"column_start":1,"column_end":76}},{"value":"/ Sampling without replacement requires state to be retained, and therefore","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":65996,"byte_end":66073,"line_start":24,"line_end":24,"column_start":1,"column_end":78}},{"value":"/ cannot be handled by a distribution; you should instead consider methods","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":66074,"byte_end":66150,"line_start":25,"line_end":25,"column_start":1,"column_end":77}},{"value":"/ on [`SliceRandom`], such as [`SliceRandom::choose_multiple`].","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":66151,"byte_end":66216,"line_start":26,"line_end":26,"column_start":1,"column_end":66}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":66217,"byte_end":66220,"line_start":27,"line_end":27,"column_start":1,"column_end":4}},{"value":"/ # Example","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":66221,"byte_end":66234,"line_start":28,"line_end":28,"column_start":1,"column_end":14}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":66235,"byte_end":66238,"line_start":29,"line_end":29,"column_start":1,"column_end":4}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":66239,"byte_end":66246,"line_start":30,"line_end":30,"column_start":1,"column_end":8}},{"value":"/ use rand::Rng;","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":66247,"byte_end":66265,"line_start":31,"line_end":31,"column_start":1,"column_end":19}},{"value":"/ use rand::distributions::Slice;","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":66266,"byte_end":66301,"line_start":32,"line_end":32,"column_start":1,"column_end":36}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":66302,"byte_end":66305,"line_start":33,"line_end":33,"column_start":1,"column_end":4}},{"value":"/ let vowels = ['a', 'e', 'i', 'o', 'u'];","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":66306,"byte_end":66349,"line_start":34,"line_end":34,"column_start":1,"column_end":44}},{"value":"/ let vowels_dist = Slice::new(&vowels).unwrap();","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":66350,"byte_end":66401,"line_start":35,"line_end":35,"column_start":1,"column_end":52}},{"value":"/ let rng = rand::thread_rng();","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":66402,"byte_end":66435,"line_start":36,"line_end":36,"column_start":1,"column_end":34}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":66436,"byte_end":66439,"line_start":37,"line_end":37,"column_start":1,"column_end":4}},{"value":"/ // build a string of 10 vowels","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":66440,"byte_end":66474,"line_start":38,"line_end":38,"column_start":1,"column_end":35}},{"value":"/ let vowel_string: String = rng","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":66475,"byte_end":66509,"line_start":39,"line_end":39,"column_start":1,"column_end":35}},{"value":"/ .sample_iter(&vowels_dist)","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":66510,"byte_end":66544,"line_start":40,"line_end":40,"column_start":1,"column_end":35}},{"value":"/ .take(10)","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":66545,"byte_end":66562,"line_start":41,"line_end":41,"column_start":1,"column_end":18}},{"value":"/ .collect();","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":66563,"byte_end":66582,"line_start":42,"line_end":42,"column_start":1,"column_end":20}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":66583,"byte_end":66586,"line_start":43,"line_end":43,"column_start":1,"column_end":4}},{"value":"/ println!(\"{}\", vowel_string);","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":66587,"byte_end":66620,"line_start":44,"line_end":44,"column_start":1,"column_end":34}},{"value":"/ assert_eq!(vowel_string.len(), 10);","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":66621,"byte_end":66660,"line_start":45,"line_end":45,"column_start":1,"column_end":40}},{"value":"/ assert!(vowel_string.chars().all(|c| vowels.contains(&c)));","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":66661,"byte_end":66724,"line_start":46,"line_end":46,"column_start":1,"column_end":64}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":66725,"byte_end":66732,"line_start":47,"line_end":47,"column_start":1,"column_end":8}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":66733,"byte_end":66736,"line_start":48,"line_end":48,"column_start":1,"column_end":4}},{"value":"/ For a single sample, [`SliceRandom::choose`][crate::seq::SliceRandom::choose]","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":66737,"byte_end":66818,"line_start":49,"line_end":49,"column_start":1,"column_end":82}},{"value":"/ may be preferred:","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":66819,"byte_end":66840,"line_start":50,"line_end":50,"column_start":1,"column_end":22}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":66841,"byte_end":66844,"line_start":51,"line_end":51,"column_start":1,"column_end":4}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":66845,"byte_end":66852,"line_start":52,"line_end":52,"column_start":1,"column_end":8}},{"value":"/ use rand::seq::SliceRandom;","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":66853,"byte_end":66884,"line_start":53,"line_end":53,"column_start":1,"column_end":32}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":66885,"byte_end":66888,"line_start":54,"line_end":54,"column_start":1,"column_end":4}},{"value":"/ let vowels = ['a', 'e', 'i', 'o', 'u'];","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":66889,"byte_end":66932,"line_start":55,"line_end":55,"column_start":1,"column_end":44}},{"value":"/ let mut rng = rand::thread_rng();","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":66933,"byte_end":66970,"line_start":56,"line_end":56,"column_start":1,"column_end":38}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":66971,"byte_end":66974,"line_start":57,"line_end":57,"column_start":1,"column_end":4}},{"value":"/ println!(\"{}\", vowels.choose(&mut rng).unwrap())","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":66975,"byte_end":67027,"line_start":58,"line_end":58,"column_start":1,"column_end":53}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":67028,"byte_end":67035,"line_start":59,"line_end":59,"column_start":1,"column_end":8}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":67036,"byte_end":67039,"line_start":60,"line_end":60,"column_start":1,"column_end":4}},{"value":"/ [`SliceRandom`]: crate::seq::SliceRandom","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":67040,"byte_end":67084,"line_start":61,"line_end":61,"column_start":1,"column_end":45}},{"value":"/ [`SliceRandom::choose`]: crate::seq::SliceRandom::choose","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":67085,"byte_end":67145,"line_start":62,"line_end":62,"column_start":1,"column_end":61}},{"value":"/ [`SliceRandom::choose_multiple`]: crate::seq::SliceRandom::choose_multiple","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":67146,"byte_end":67224,"line_start":63,"line_end":63,"column_start":1,"column_end":79}}]},{"kind":"Method","id":{"krate":0,"index":237},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":67492,"byte_end":67495,"line_start":73,"line_end":73,"column_start":12,"column_end":15},"name":"new","qualname":"<Slice>::new","value":"pub fn new(&'a [T]) -> Result<Self, EmptySlice>","parent":null,"children":[],"decl_id":null,"docs":" Create a new `Slice` instance which samples uniformly from the slice.\n Returns `Err` if the slice is empty.\n","sig":null,"attributes":[{"value":"/ Create a new `Slice` instance which samples uniformly from the slice.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":67362,"byte_end":67435,"line_start":71,"line_end":71,"column_start":5,"column_end":78}},{"value":"/ Returns `Err` if the slice is empty.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":67440,"byte_end":67480,"line_start":72,"line_end":72,"column_start":5,"column_end":45}}]},{"kind":"Struct","id":{"krate":0,"index":1588},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":68454,"byte_end":68464,"line_start":105,"line_end":105,"column_start":12,"column_end":22},"name":"EmptySlice","qualname":"::distributions::slice::EmptySlice","value":"","parent":null,"children":[],"decl_id":null,"docs":" Error type indicating that a [`Slice`] distribution was improperly\n constructed with an empty slice.\n","sig":null,"attributes":[{"value":"/ Error type indicating that a [`Slice`] distribution was improperly","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":68305,"byte_end":68375,"line_start":102,"line_end":102,"column_start":1,"column_end":71}},{"value":"/ constructed with an empty slice.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":68376,"byte_end":68412,"line_start":103,"line_end":103,"column_start":1,"column_end":37}}]},{"kind":"Type","id":{"krate":0,"index":249},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/utils.rs","byte_start":69269,"byte_end":69275,"line_start":15,"line_end":15,"column_start":10,"column_end":16},"name":"Output","qualname":"::distributions::utils::WideningMultiply::Output","value":"type Output;","parent":{"krate":0,"index":247},"children":[],"decl_id":null,"docs":"","sig":null,"attributes":[]},{"kind":"Type","id":{"krate":0,"index":258},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/utils.rs","byte_start":76192,"byte_end":76196,"line_start":218,"line_end":218,"column_start":10,"column_end":14},"name":"Mask","qualname":"::distributions::utils::FloatSIMDUtils::Mask","value":"type Mask;","parent":{"krate":0,"index":254},"children":[],"decl_id":null,"docs":"","sig":null,"attributes":[]},{"kind":"Type","id":{"krate":0,"index":263},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/utils.rs","byte_start":76711,"byte_end":76715,"line_start":230,"line_end":230,"column_start":10,"column_end":14},"name":"UInt","qualname":"::distributions::utils::FloatSIMDUtils::UInt","value":"type UInt;","parent":{"krate":0,"index":254},"children":[],"decl_id":null,"docs":"","sig":null,"attributes":[]},{"kind":"Struct","id":{"krate":0,"index":1646},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":85732,"byte_end":85745,"line_start":81,"line_end":81,"column_start":12,"column_end":25},"name":"WeightedIndex","qualname":"::distributions::weighted_index::WeightedIndex","value":"WeightedIndex { }","parent":null,"children":[{"krate":0,"index":1648},{"krate":0,"index":1649},{"krate":0,"index":1650}],"decl_id":null,"docs":" A distribution using weighted sampling of discrete items","sig":null,"attributes":[{"value":"/ A distribution using weighted sampling of discrete items","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":83117,"byte_end":83177,"line_start":23,"line_end":23,"column_start":1,"column_end":61}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":83178,"byte_end":83181,"line_start":24,"line_end":24,"column_start":1,"column_end":4}},{"value":"/ Sampling a `WeightedIndex` distribution returns the index of a randomly","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":83182,"byte_end":83257,"line_start":25,"line_end":25,"column_start":1,"column_end":76}},{"value":"/ selected element from the iterator used when the `WeightedIndex` was","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":83258,"byte_end":83330,"line_start":26,"line_end":26,"column_start":1,"column_end":73}},{"value":"/ created. The chance of a given element being picked is proportional to the","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":83331,"byte_end":83409,"line_start":27,"line_end":27,"column_start":1,"column_end":79}},{"value":"/ value of the element. The weights can use any type `X` for which an","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":83410,"byte_end":83481,"line_start":28,"line_end":28,"column_start":1,"column_end":72}},{"value":"/ implementation of [`Uniform<X>`] exists.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":83482,"byte_end":83526,"line_start":29,"line_end":29,"column_start":1,"column_end":45}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":83527,"byte_end":83530,"line_start":30,"line_end":30,"column_start":1,"column_end":4}},{"value":"/ # Performance","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":83531,"byte_end":83548,"line_start":31,"line_end":31,"column_start":1,"column_end":18}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":83549,"byte_end":83552,"line_start":32,"line_end":32,"column_start":1,"column_end":4}},{"value":"/ Time complexity of sampling from `WeightedIndex` is `O(log N)` where","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":83553,"byte_end":83625,"line_start":33,"line_end":33,"column_start":1,"column_end":73}},{"value":"/ `N` is the number of weights. As an alternative,","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":83626,"byte_end":83678,"line_start":34,"line_end":34,"column_start":1,"column_end":53}},{"value":"/ [`rand_distr::weighted_alias`](https://docs.rs/rand_distr/*/rand_distr/weighted_alias/index.html)","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":83679,"byte_end":83780,"line_start":35,"line_end":35,"column_start":1,"column_end":102}},{"value":"/ supports `O(1)` sampling, but with much higher initialisation cost.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":83781,"byte_end":83852,"line_start":36,"line_end":36,"column_start":1,"column_end":72}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":83853,"byte_end":83856,"line_start":37,"line_end":37,"column_start":1,"column_end":4}},{"value":"/ A `WeightedIndex<X>` contains a `Vec<X>` and a [`Uniform<X>`] and so its","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":83857,"byte_end":83933,"line_start":38,"line_end":38,"column_start":1,"column_end":77}},{"value":"/ size is the sum of the size of those objects, possibly plus some alignment.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":83934,"byte_end":84013,"line_start":39,"line_end":39,"column_start":1,"column_end":80}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":84014,"byte_end":84017,"line_start":40,"line_end":40,"column_start":1,"column_end":4}},{"value":"/ Creating a `WeightedIndex<X>` will allocate enough space to hold `N - 1`","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":84018,"byte_end":84094,"line_start":41,"line_end":41,"column_start":1,"column_end":77}},{"value":"/ weights of type `X`, where `N` is the number of weights. However, since","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":84095,"byte_end":84170,"line_start":42,"line_end":42,"column_start":1,"column_end":76}},{"value":"/ `Vec` doesn't guarantee a particular growth strategy, additional memory","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":84171,"byte_end":84246,"line_start":43,"line_end":43,"column_start":1,"column_end":76}},{"value":"/ might be allocated but not used. Since the `WeightedIndex` object also","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":84247,"byte_end":84321,"line_start":44,"line_end":44,"column_start":1,"column_end":75}},{"value":"/ contains, this might cause additional allocations, though for primitive","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":84322,"byte_end":84397,"line_start":45,"line_end":45,"column_start":1,"column_end":76}},{"value":"/ types, [`Uniform<X>`] doesn't allocate any memory.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":84398,"byte_end":84452,"line_start":46,"line_end":46,"column_start":1,"column_end":55}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":84453,"byte_end":84456,"line_start":47,"line_end":47,"column_start":1,"column_end":4}},{"value":"/ Sampling from `WeightedIndex` will result in a single call to","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":84457,"byte_end":84522,"line_start":48,"line_end":48,"column_start":1,"column_end":66}},{"value":"/ `Uniform<X>::sample` (method of the [`Distribution`] trait), which typically","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":84523,"byte_end":84603,"line_start":49,"line_end":49,"column_start":1,"column_end":81}},{"value":"/ will request a single value from the underlying [`RngCore`], though the","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":84604,"byte_end":84679,"line_start":50,"line_end":50,"column_start":1,"column_end":76}},{"value":"/ exact number depends on the implementation of `Uniform<X>::sample`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":84680,"byte_end":84751,"line_start":51,"line_end":51,"column_start":1,"column_end":72}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":84752,"byte_end":84755,"line_start":52,"line_end":52,"column_start":1,"column_end":4}},{"value":"/ # Example","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":84756,"byte_end":84769,"line_start":53,"line_end":53,"column_start":1,"column_end":14}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":84770,"byte_end":84773,"line_start":54,"line_end":54,"column_start":1,"column_end":4}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":84774,"byte_end":84781,"line_start":55,"line_end":55,"column_start":1,"column_end":8}},{"value":"/ use rand::prelude::*;","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":84782,"byte_end":84807,"line_start":56,"line_end":56,"column_start":1,"column_end":26}},{"value":"/ use rand::distributions::WeightedIndex;","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":84808,"byte_end":84851,"line_start":57,"line_end":57,"column_start":1,"column_end":44}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":84852,"byte_end":84855,"line_start":58,"line_end":58,"column_start":1,"column_end":4}},{"value":"/ let choices = ['a', 'b', 'c'];","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":84856,"byte_end":84890,"line_start":59,"line_end":59,"column_start":1,"column_end":35}},{"value":"/ let weights = [2, 1, 1];","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":84891,"byte_end":84923,"line_start":60,"line_end":60,"column_start":1,"column_end":33}},{"value":"/ let dist = WeightedIndex::new(&weights).unwrap();","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":84924,"byte_end":84977,"line_start":61,"line_end":61,"column_start":1,"column_end":54}},{"value":"/ let mut rng = thread_rng();","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":84978,"byte_end":85009,"line_start":62,"line_end":62,"column_start":1,"column_end":32}},{"value":"/ for _ in 0..100 {","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":85010,"byte_end":85031,"line_start":63,"line_end":63,"column_start":1,"column_end":22}},{"value":"/ // 50% chance to print 'a', 25% chance to print 'b', 25% chance to print 'c'","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":85032,"byte_end":85116,"line_start":64,"line_end":64,"column_start":1,"column_end":85}},{"value":"/ println!(\"{}\", choices[dist.sample(&mut rng)]);","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":85117,"byte_end":85172,"line_start":65,"line_end":65,"column_start":1,"column_end":56}},{"value":"/ }","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":85173,"byte_end":85178,"line_start":66,"line_end":66,"column_start":1,"column_end":6}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":85179,"byte_end":85182,"line_start":67,"line_end":67,"column_start":1,"column_end":4}},{"value":"/ let items = [('a', 0), ('b', 3), ('c', 7)];","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":85183,"byte_end":85230,"line_start":68,"line_end":68,"column_start":1,"column_end":48}},{"value":"/ let dist2 = WeightedIndex::new(items.iter().map(|item| item.1)).unwrap();","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":85231,"byte_end":85308,"line_start":69,"line_end":69,"column_start":1,"column_end":78}},{"value":"/ for _ in 0..100 {","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":85309,"byte_end":85330,"line_start":70,"line_end":70,"column_start":1,"column_end":22}},{"value":"/ // 0% chance to print 'a', 30% chance to print 'b', 70% chance to print 'c'","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":85331,"byte_end":85414,"line_start":71,"line_end":71,"column_start":1,"column_end":84}},{"value":"/ println!(\"{}\", items[dist2.sample(&mut rng)].0);","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":85415,"byte_end":85471,"line_start":72,"line_end":72,"column_start":1,"column_end":57}},{"value":"/ }","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":85472,"byte_end":85477,"line_start":73,"line_end":73,"column_start":1,"column_end":6}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":85478,"byte_end":85485,"line_start":74,"line_end":74,"column_start":1,"column_end":8}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":85486,"byte_end":85489,"line_start":75,"line_end":75,"column_start":1,"column_end":4}},{"value":"/ [`Uniform<X>`]: crate::distributions::Uniform","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":85490,"byte_end":85539,"line_start":76,"line_end":76,"column_start":1,"column_end":50}},{"value":"/ [`RngCore`]: crate::RngCore","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":85540,"byte_end":85571,"line_start":77,"line_end":77,"column_start":1,"column_end":32}}]},{"kind":"Method","id":{"krate":0,"index":311},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":86319,"byte_end":86322,"line_start":96,"line_end":96,"column_start":12,"column_end":15},"name":"new","qualname":"<WeightedIndex<X>>::new","value":"pub fn new<I>(I) -> Result<WeightedIndex<X>, WeightedError> where\nI: IntoIterator, I::Item: SampleBorrow<X>,\nX: for<'a> ::core::ops::AddAssign<&'a X> + Clone + Default","parent":null,"children":[],"decl_id":null,"docs":" Creates a new a `WeightedIndex` [`Distribution`] using the values\n in `weights`. The weights can use any type `X` for which an\n implementation of [`Uniform<X>`] exists.","sig":null,"attributes":[{"value":"/ Creates a new a `WeightedIndex` [`Distribution`] using the values","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":85931,"byte_end":86000,"line_start":88,"line_end":88,"column_start":5,"column_end":74}},{"value":"/ in `weights`. The weights can use any type `X` for which an","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":86005,"byte_end":86068,"line_start":89,"line_end":89,"column_start":5,"column_end":68}},{"value":"/ implementation of [`Uniform<X>`] exists.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":86073,"byte_end":86117,"line_start":90,"line_end":90,"column_start":5,"column_end":49}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":86122,"byte_end":86125,"line_start":91,"line_end":91,"column_start":5,"column_end":8}},{"value":"/ Returns an error if the iterator is empty, if any weight is `< 0`, or","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":86130,"byte_end":86203,"line_start":92,"line_end":92,"column_start":5,"column_end":78}},{"value":"/ if its total value is 0.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":86208,"byte_end":86236,"line_start":93,"line_end":93,"column_start":5,"column_end":33}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":86241,"byte_end":86244,"line_start":94,"line_end":94,"column_start":5,"column_end":8}},{"value":"/ [`Uniform<X>`]: crate::distributions::uniform::Uniform","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":86249,"byte_end":86307,"line_start":95,"line_end":95,"column_start":5,"column_end":63}}]},{"kind":"Method","id":{"krate":0,"index":314},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":88010,"byte_end":88024,"line_start":142,"line_end":142,"column_start":12,"column_end":26},"name":"update_weights","qualname":"<WeightedIndex<X>>::update_weights","value":"pub fn update_weights(&mut Self, &[(usize, &X)]) -> Result<(), WeightedError>\nwhere X: for<'a> ::core::ops::AddAssign<&'a X> +\nfor<'a> ::core::ops::SubAssign<&'a X> + Clone + Default","parent":null,"children":[],"decl_id":null,"docs":" Update a subset of weights, without changing the number of weights.","sig":null,"attributes":[{"value":"/ Update a subset of weights, without changing the number of weights.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":87587,"byte_end":87658,"line_start":133,"line_end":133,"column_start":5,"column_end":76}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":87663,"byte_end":87666,"line_start":134,"line_end":134,"column_start":5,"column_end":8}},{"value":"/ `new_weights` must be sorted by the index.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":87671,"byte_end":87717,"line_start":135,"line_end":135,"column_start":5,"column_end":51}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":87722,"byte_end":87725,"line_start":136,"line_end":136,"column_start":5,"column_end":8}},{"value":"/ Using this method instead of `new` might be more efficient if only a small number of","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":87730,"byte_end":87818,"line_start":137,"line_end":137,"column_start":5,"column_end":93}},{"value":"/ weights is modified. No allocations are performed, unless the weight type `X` uses","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":87823,"byte_end":87909,"line_start":138,"line_end":138,"column_start":5,"column_end":91}},{"value":"/ allocation internally.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":87914,"byte_end":87940,"line_start":139,"line_end":139,"column_start":5,"column_end":31}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":87945,"byte_end":87948,"line_start":140,"line_end":140,"column_start":5,"column_end":8}},{"value":"/ In case of error, `self` is not modified.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":87953,"byte_end":87998,"line_start":141,"line_end":141,"column_start":5,"column_end":50}}]},{"kind":"TupleVariant","id":{"krate":0,"index":1664},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":97788,"byte_end":97794,"line_start":433,"line_end":433,"column_start":5,"column_end":11},"name":"NoItem","qualname":"::distributions::weighted_index::WeightedError::NoItem","value":"WeightedError::NoItem","parent":{"krate":0,"index":1663},"children":[],"decl_id":null,"docs":" The provided weight collection contains no items.\n","sig":null,"attributes":[{"value":"/ The provided weight collection contains no items.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":97730,"byte_end":97783,"line_start":432,"line_end":432,"column_start":5,"column_end":58}}]},{"kind":"TupleVariant","id":{"krate":0,"index":1666},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":97915,"byte_end":97928,"line_start":437,"line_end":437,"column_start":5,"column_end":18},"name":"InvalidWeight","qualname":"::distributions::weighted_index::WeightedError::InvalidWeight","value":"WeightedError::InvalidWeight","parent":{"krate":0,"index":1663},"children":[],"decl_id":null,"docs":" A weight is either less than zero, greater than the supported maximum,\n NaN, or otherwise invalid.\n","sig":null,"attributes":[{"value":"/ A weight is either less than zero, greater than the supported maximum,","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":97801,"byte_end":97875,"line_start":435,"line_end":435,"column_start":5,"column_end":79}},{"value":"/ NaN, or otherwise invalid.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":97880,"byte_end":97910,"line_start":436,"line_end":436,"column_start":5,"column_end":35}}]},{"kind":"TupleVariant","id":{"krate":0,"index":1668},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":97997,"byte_end":98011,"line_start":440,"line_end":440,"column_start":5,"column_end":19},"name":"AllWeightsZero","qualname":"::distributions::weighted_index::WeightedError::AllWeightsZero","value":"WeightedError::AllWeightsZero","parent":{"krate":0,"index":1663},"children":[],"decl_id":null,"docs":" All items in the provided weight collection are zero.\n","sig":null,"attributes":[{"value":"/ All items in the provided weight collection are zero.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":97935,"byte_end":97992,"line_start":439,"line_end":439,"column_start":5,"column_end":62}}]},{"kind":"TupleVariant","id":{"krate":0,"index":1670},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":98089,"byte_end":98096,"line_start":443,"line_end":443,"column_start":5,"column_end":12},"name":"TooMany","qualname":"::distributions::weighted_index::WeightedError::TooMany","value":"WeightedError::TooMany","parent":{"krate":0,"index":1663},"children":[],"decl_id":null,"docs":" Too many weights are provided (length greater than `u32::MAX`)\n","sig":null,"attributes":[{"value":"/ Too many weights are provided (length greater than `u32::MAX`)","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":98018,"byte_end":98084,"line_start":442,"line_end":442,"column_start":5,"column_end":71}}]},{"kind":"Enum","id":{"krate":0,"index":1663},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":97710,"byte_end":97723,"line_start":431,"line_end":431,"column_start":10,"column_end":23},"name":"WeightedError","qualname":"::distributions::weighted_index::WeightedError","value":"pub enum WeightedError { NoItem, InvalidWeight, AllWeightsZero, TooMany, }","parent":null,"children":[{"krate":0,"index":1664},{"krate":0,"index":1666},{"krate":0,"index":1668},{"krate":0,"index":1670}],"decl_id":null,"docs":" Error type returned from `WeightedIndex::new`.\n","sig":null,"attributes":[{"value":"/ Error type returned from `WeightedIndex::new`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":97555,"byte_end":97605,"line_start":428,"line_end":428,"column_start":1,"column_end":51}}]},{"kind":"Mod","id":{"krate":0,"index":328},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":11195,"byte_end":11208,"line_start":107,"line_end":107,"column_start":9,"column_end":22},"name":"hidden_export","qualname":"::distributions::hidden_export","value":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","parent":null,"children":[{"krate":0,"index":329}],"decl_id":null,"docs":"","sig":null,"attributes":[]},{"kind":"Mod","id":{"krate":0,"index":332},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1},"name":"uniform","qualname":"::distributions::uniform","value":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","parent":null,"children":[{"krate":0,"index":333},{"krate":0,"index":336},{"krate":0,"index":337},{"krate":0,"index":340},{"krate":0,"index":343},{"krate":0,"index":346},{"krate":0,"index":347},{"krate":0,"index":350},{"krate":0,"index":353},{"krate":0,"index":356},{"krate":0,"index":359},{"krate":0,"index":362},{"krate":0,"index":363},{"krate":0,"index":366},{"krate":0,"index":1683},{"krate":0,"index":1687},{"krate":0,"index":1690},{"krate":0,"index":1692},{"krate":0,"index":1695},{"krate":0,"index":1697},{"krate":0,"index":369},{"krate":0,"index":377},{"krate":0,"index":381},{"krate":0,"index":383},{"krate":0,"index":401},{"krate":0,"index":404},{"krate":0,"index":407},{"krate":0,"index":410},{"krate":0,"index":413},{"krate":0,"index":417},{"krate":0,"index":422},{"krate":0,"index":427},{"krate":0,"index":1701},{"krate":0,"index":1706},{"krate":0,"index":1709},{"krate":0,"index":1711},{"krate":0,"index":1714},{"krate":0,"index":1716},{"krate":0,"index":432},{"krate":0,"index":1720},{"krate":0,"index":1722},{"krate":0,"index":1740},{"krate":0,"index":1742},{"krate":0,"index":1760},{"krate":0,"index":1762},{"krate":0,"index":1780},{"krate":0,"index":1782},{"krate":0,"index":1800},{"krate":0,"index":1802},{"krate":0,"index":1820},{"krate":0,"index":1822},{"krate":0,"index":1840},{"krate":0,"index":1842},{"krate":0,"index":1860},{"krate":0,"index":1862},{"krate":0,"index":1880},{"krate":0,"index":1882},{"krate":0,"index":1900},{"krate":0,"index":1902},{"krate":0,"index":1920},{"krate":0,"index":1922},{"krate":0,"index":1940},{"krate":0,"index":1942},{"krate":0,"index":433},{"krate":0,"index":1960},{"krate":0,"index":1962},{"krate":0,"index":1964},{"krate":0,"index":1965},{"krate":0,"index":435},{"krate":0,"index":436},{"krate":0,"index":437},{"krate":0,"index":438},{"krate":0,"index":1967},{"krate":0,"index":1971},{"krate":0,"index":1974},{"krate":0,"index":1976},{"krate":0,"index":1979},{"krate":0,"index":1981},{"krate":0,"index":448},{"krate":0,"index":1985},{"krate":0,"index":1987},{"krate":0,"index":2001},{"krate":0,"index":2003},{"krate":0,"index":2017},{"krate":0,"index":2020},{"krate":0,"index":2022},{"krate":0,"index":2023},{"krate":0,"index":2025},{"krate":0,"index":2035},{"krate":0,"index":2037},{"krate":0,"index":2038},{"krate":0,"index":449},{"krate":0,"index":451}],"decl_id":null,"docs":" A distribution uniformly sampling numbers within a given range.","sig":null,"attributes":[{"value":"/ A distribution uniformly sampling numbers within a given range.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":99062,"byte_end":99129,"line_start":10,"line_end":10,"column_start":1,"column_end":68}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":99130,"byte_end":99133,"line_start":11,"line_end":11,"column_start":1,"column_end":4}},{"value":"/ [`Uniform`] is the standard distribution to sample uniformly from a range;","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":99134,"byte_end":99212,"line_start":12,"line_end":12,"column_start":1,"column_end":79}},{"value":"/ e.g. `Uniform::new_inclusive(1, 6)` can sample integers from 1 to 6, like a","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":99213,"byte_end":99292,"line_start":13,"line_end":13,"column_start":1,"column_end":80}},{"value":"/ standard die. [`Rng::gen_range`] supports any type supported by","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":99293,"byte_end":99360,"line_start":14,"line_end":14,"column_start":1,"column_end":68}},{"value":"/ [`Uniform`].","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":99361,"byte_end":99377,"line_start":15,"line_end":15,"column_start":1,"column_end":17}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":99378,"byte_end":99381,"line_start":16,"line_end":16,"column_start":1,"column_end":4}},{"value":"/ This distribution is provided with support for several primitive types","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":99382,"byte_end":99456,"line_start":17,"line_end":17,"column_start":1,"column_end":75}},{"value":"/ (all integer and floating-point types) as well as [`std::time::Duration`],","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":99457,"byte_end":99535,"line_start":18,"line_end":18,"column_start":1,"column_end":79}},{"value":"/ and supports extension to user-defined types via a type-specific *back-end*","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":99536,"byte_end":99615,"line_start":19,"line_end":19,"column_start":1,"column_end":80}},{"value":"/ implementation.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":99616,"byte_end":99635,"line_start":20,"line_end":20,"column_start":1,"column_end":20}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":99636,"byte_end":99639,"line_start":21,"line_end":21,"column_start":1,"column_end":4}},{"value":"/ The types [`UniformInt`], [`UniformFloat`] and [`UniformDuration`] are the","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":99640,"byte_end":99718,"line_start":22,"line_end":22,"column_start":1,"column_end":79}},{"value":"/ back-ends supporting sampling from primitive integer and floating-point","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":99719,"byte_end":99794,"line_start":23,"line_end":23,"column_start":1,"column_end":76}},{"value":"/ ranges as well as from [`std::time::Duration`]; these types do not normally","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":99795,"byte_end":99874,"line_start":24,"line_end":24,"column_start":1,"column_end":80}},{"value":"/ need to be used directly (unless implementing a derived back-end).","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":99875,"byte_end":99945,"line_start":25,"line_end":25,"column_start":1,"column_end":71}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":99946,"byte_end":99949,"line_start":26,"line_end":26,"column_start":1,"column_end":4}},{"value":"/ # Example usage","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":99950,"byte_end":99969,"line_start":27,"line_end":27,"column_start":1,"column_end":20}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":99970,"byte_end":99973,"line_start":28,"line_end":28,"column_start":1,"column_end":4}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":99974,"byte_end":99981,"line_start":29,"line_end":29,"column_start":1,"column_end":8}},{"value":"/ use rand::{Rng, thread_rng};","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":99982,"byte_end":100014,"line_start":30,"line_end":30,"column_start":1,"column_end":33}},{"value":"/ use rand::distributions::Uniform;","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":100015,"byte_end":100052,"line_start":31,"line_end":31,"column_start":1,"column_end":38}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":100053,"byte_end":100056,"line_start":32,"line_end":32,"column_start":1,"column_end":4}},{"value":"/ let mut rng = thread_rng();","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":100057,"byte_end":100088,"line_start":33,"line_end":33,"column_start":1,"column_end":32}},{"value":"/ let side = Uniform::new(-10.0, 10.0);","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":100089,"byte_end":100130,"line_start":34,"line_end":34,"column_start":1,"column_end":42}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":100131,"byte_end":100134,"line_start":35,"line_end":35,"column_start":1,"column_end":4}},{"value":"/ // sample between 1 and 10 points","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":100135,"byte_end":100172,"line_start":36,"line_end":36,"column_start":1,"column_end":38}},{"value":"/ for _ in 0..rng.gen_range(1..=10) {","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":100173,"byte_end":100212,"line_start":37,"line_end":37,"column_start":1,"column_end":40}},{"value":"/ // sample a point from the square with sides -10 - 10 in two dimensions","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":100213,"byte_end":100292,"line_start":38,"line_end":38,"column_start":1,"column_end":80}},{"value":"/ let (x, y) = (rng.sample(side), rng.sample(side));","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":100293,"byte_end":100351,"line_start":39,"line_end":39,"column_start":1,"column_end":59}},{"value":"/ println!(\"Point: {}, {}\", x, y);","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":100352,"byte_end":100392,"line_start":40,"line_end":40,"column_start":1,"column_end":41}},{"value":"/ }","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":100393,"byte_end":100398,"line_start":41,"line_end":41,"column_start":1,"column_end":6}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":100399,"byte_end":100406,"line_start":42,"line_end":42,"column_start":1,"column_end":8}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":100407,"byte_end":100410,"line_start":43,"line_end":43,"column_start":1,"column_end":4}},{"value":"/ # Extending `Uniform` to support a custom type","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":100411,"byte_end":100461,"line_start":44,"line_end":44,"column_start":1,"column_end":51}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":100462,"byte_end":100465,"line_start":45,"line_end":45,"column_start":1,"column_end":4}},{"value":"/ To extend [`Uniform`] to support your own types, write a back-end which","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":100466,"byte_end":100541,"line_start":46,"line_end":46,"column_start":1,"column_end":76}},{"value":"/ implements the [`UniformSampler`] trait, then implement the [`SampleUniform`]","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":100542,"byte_end":100623,"line_start":47,"line_end":47,"column_start":1,"column_end":82}},{"value":"/ helper trait to \"register\" your back-end. See the `MyF32` example below.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":100624,"byte_end":100700,"line_start":48,"line_end":48,"column_start":1,"column_end":77}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":100701,"byte_end":100704,"line_start":49,"line_end":49,"column_start":1,"column_end":4}},{"value":"/ At a minimum, the back-end needs to store any parameters needed for sampling","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":100705,"byte_end":100785,"line_start":50,"line_end":50,"column_start":1,"column_end":81}},{"value":"/ (e.g. the target range) and implement `new`, `new_inclusive` and `sample`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":100786,"byte_end":100864,"line_start":51,"line_end":51,"column_start":1,"column_end":79}},{"value":"/ Those methods should include an assert to check the range is valid (i.e.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":100865,"byte_end":100941,"line_start":52,"line_end":52,"column_start":1,"column_end":77}},{"value":"/ `low < high`). The example below merely wraps another back-end.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":100942,"byte_end":101009,"line_start":53,"line_end":53,"column_start":1,"column_end":68}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":101010,"byte_end":101013,"line_start":54,"line_end":54,"column_start":1,"column_end":4}},{"value":"/ The `new`, `new_inclusive` and `sample_single` functions use arguments of","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":101014,"byte_end":101091,"line_start":55,"line_end":55,"column_start":1,"column_end":78}},{"value":"/ type SampleBorrow<X> in order to support passing in values by reference or","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":101092,"byte_end":101170,"line_start":56,"line_end":56,"column_start":1,"column_end":79}},{"value":"/ by value. In the implementation of these functions, you can choose to","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":101171,"byte_end":101244,"line_start":57,"line_end":57,"column_start":1,"column_end":74}},{"value":"/ simply use the reference returned by [`SampleBorrow::borrow`], or you can choose","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":101245,"byte_end":101329,"line_start":58,"line_end":58,"column_start":1,"column_end":85}},{"value":"/ to copy or clone the value, whatever is appropriate for your type.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":101330,"byte_end":101400,"line_start":59,"line_end":59,"column_start":1,"column_end":71}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":101401,"byte_end":101404,"line_start":60,"line_end":60,"column_start":1,"column_end":4}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":101405,"byte_end":101412,"line_start":61,"line_end":61,"column_start":1,"column_end":8}},{"value":"/ use rand::prelude::*;","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":101413,"byte_end":101438,"line_start":62,"line_end":62,"column_start":1,"column_end":26}},{"value":"/ use rand::distributions::uniform::{Uniform, SampleUniform,","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":101439,"byte_end":101501,"line_start":63,"line_end":63,"column_start":1,"column_end":63}},{"value":"/ UniformSampler, UniformFloat, SampleBorrow};","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":101502,"byte_end":101558,"line_start":64,"line_end":64,"column_start":1,"column_end":57}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":101559,"byte_end":101562,"line_start":65,"line_end":65,"column_start":1,"column_end":4}},{"value":"/ struct MyF32(f32);","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":101563,"byte_end":101585,"line_start":66,"line_end":66,"column_start":1,"column_end":23}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":101586,"byte_end":101589,"line_start":67,"line_end":67,"column_start":1,"column_end":4}},{"value":"/ #[derive(Clone, Copy, Debug)]","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":101590,"byte_end":101623,"line_start":68,"line_end":68,"column_start":1,"column_end":34}},{"value":"/ struct UniformMyF32(UniformFloat<f32>);","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":101624,"byte_end":101667,"line_start":69,"line_end":69,"column_start":1,"column_end":44}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":101668,"byte_end":101671,"line_start":70,"line_end":70,"column_start":1,"column_end":4}},{"value":"/ impl UniformSampler for UniformMyF32 {","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":101672,"byte_end":101714,"line_start":71,"line_end":71,"column_start":1,"column_end":43}},{"value":"/ type X = MyF32;","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":101715,"byte_end":101738,"line_start":72,"line_end":72,"column_start":1,"column_end":24}},{"value":"/ fn new<B1, B2>(low: B1, high: B2) -> Self","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":101739,"byte_end":101788,"line_start":73,"line_end":73,"column_start":1,"column_end":50}},{"value":"/ where B1: SampleBorrow<Self::X> + Sized,","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":101789,"byte_end":101841,"line_start":74,"line_end":74,"column_start":1,"column_end":53}},{"value":"/ B2: SampleBorrow<Self::X> + Sized","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":101842,"byte_end":101893,"line_start":75,"line_end":75,"column_start":1,"column_end":52}},{"value":"/ {","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":101894,"byte_end":101903,"line_start":76,"line_end":76,"column_start":1,"column_end":10}},{"value":"/ UniformMyF32(UniformFloat::<f32>::new(low.borrow().0, high.borrow().0))","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":101904,"byte_end":101987,"line_start":77,"line_end":77,"column_start":1,"column_end":84}},{"value":"/ }","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":101988,"byte_end":101997,"line_start":78,"line_end":78,"column_start":1,"column_end":10}},{"value":"/ fn new_inclusive<B1, B2>(low: B1, high: B2) -> Self","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":101998,"byte_end":102057,"line_start":79,"line_end":79,"column_start":1,"column_end":60}},{"value":"/ where B1: SampleBorrow<Self::X> + Sized,","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":102058,"byte_end":102110,"line_start":80,"line_end":80,"column_start":1,"column_end":53}},{"value":"/ B2: SampleBorrow<Self::X> + Sized","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":102111,"byte_end":102162,"line_start":81,"line_end":81,"column_start":1,"column_end":52}},{"value":"/ {","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":102163,"byte_end":102172,"line_start":82,"line_end":82,"column_start":1,"column_end":10}},{"value":"/ UniformMyF32(UniformFloat::<f32>::new_inclusive(","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":102173,"byte_end":102233,"line_start":83,"line_end":83,"column_start":1,"column_end":61}},{"value":"/ low.borrow().0,","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":102234,"byte_end":102265,"line_start":84,"line_end":84,"column_start":1,"column_end":32}},{"value":"/ high.borrow().0,","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":102266,"byte_end":102298,"line_start":85,"line_end":85,"column_start":1,"column_end":33}},{"value":"/ ))","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":102299,"byte_end":102313,"line_start":86,"line_end":86,"column_start":1,"column_end":15}},{"value":"/ }","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":102314,"byte_end":102323,"line_start":87,"line_end":87,"column_start":1,"column_end":10}},{"value":"/ fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Self::X {","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":102324,"byte_end":102391,"line_start":88,"line_end":88,"column_start":1,"column_end":68}},{"value":"/ MyF32(self.0.sample(rng))","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":102392,"byte_end":102429,"line_start":89,"line_end":89,"column_start":1,"column_end":38}},{"value":"/ }","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":102430,"byte_end":102439,"line_start":90,"line_end":90,"column_start":1,"column_end":10}},{"value":"/ }","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":102440,"byte_end":102445,"line_start":91,"line_end":91,"column_start":1,"column_end":6}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":102446,"byte_end":102449,"line_start":92,"line_end":92,"column_start":1,"column_end":4}},{"value":"/ impl SampleUniform for MyF32 {","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":102450,"byte_end":102484,"line_start":93,"line_end":93,"column_start":1,"column_end":35}},{"value":"/ type Sampler = UniformMyF32;","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":102485,"byte_end":102521,"line_start":94,"line_end":94,"column_start":1,"column_end":37}},{"value":"/ }","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":102522,"byte_end":102527,"line_start":95,"line_end":95,"column_start":1,"column_end":6}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":102528,"byte_end":102531,"line_start":96,"line_end":96,"column_start":1,"column_end":4}},{"value":"/ let (low, high) = (MyF32(17.0f32), MyF32(22.0f32));","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":102532,"byte_end":102587,"line_start":97,"line_end":97,"column_start":1,"column_end":56}},{"value":"/ let uniform = Uniform::new(low, high);","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":102588,"byte_end":102630,"line_start":98,"line_end":98,"column_start":1,"column_end":43}},{"value":"/ let x = uniform.sample(&mut thread_rng());","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":102631,"byte_end":102677,"line_start":99,"line_end":99,"column_start":1,"column_end":47}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":102678,"byte_end":102685,"line_start":100,"line_end":100,"column_start":1,"column_end":8}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":102686,"byte_end":102689,"line_start":101,"line_end":101,"column_start":1,"column_end":4}},{"value":"/ [`SampleUniform`]: crate::distributions::uniform::SampleUniform","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":102690,"byte_end":102757,"line_start":102,"line_end":102,"column_start":1,"column_end":68}},{"value":"/ [`UniformSampler`]: crate::distributions::uniform::UniformSampler","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":102758,"byte_end":102827,"line_start":103,"line_end":103,"column_start":1,"column_end":70}},{"value":"/ [`UniformInt`]: crate::distributions::uniform::UniformInt","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":102828,"byte_end":102889,"line_start":104,"line_end":104,"column_start":1,"column_end":62}},{"value":"/ [`UniformFloat`]: crate::distributions::uniform::UniformFloat","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":102890,"byte_end":102955,"line_start":105,"line_end":105,"column_start":1,"column_end":66}},{"value":"/ [`UniformDuration`]: crate::distributions::uniform::UniformDuration","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":102956,"byte_end":103027,"line_start":106,"line_end":106,"column_start":1,"column_end":72}},{"value":"/ [`SampleBorrow::borrow`]: crate::distributions::uniform::SampleBorrow::borrow","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":103028,"byte_end":103109,"line_start":107,"line_end":107,"column_start":1,"column_end":82}}]},{"kind":"Struct","id":{"krate":0,"index":1683},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":105818,"byte_end":105825,"line_start":179,"line_end":179,"column_start":12,"column_end":19},"name":"Uniform","qualname":"::distributions::uniform::Uniform","value":"","parent":null,"children":[],"decl_id":null,"docs":" Sample values uniformly between two bounds.","sig":null,"attributes":[{"value":"/ Sample values uniformly between two bounds.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":103649,"byte_end":103696,"line_start":126,"line_end":126,"column_start":1,"column_end":48}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":103697,"byte_end":103700,"line_start":127,"line_end":127,"column_start":1,"column_end":4}},{"value":"/ [`Uniform::new`] and [`Uniform::new_inclusive`] construct a uniform","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":103701,"byte_end":103772,"line_start":128,"line_end":128,"column_start":1,"column_end":72}},{"value":"/ distribution sampling from the given range; these functions may do extra","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":103773,"byte_end":103849,"line_start":129,"line_end":129,"column_start":1,"column_end":77}},{"value":"/ work up front to make sampling of multiple values faster. If only one sample","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":103850,"byte_end":103930,"line_start":130,"line_end":130,"column_start":1,"column_end":81}},{"value":"/ from the range is required, [`Rng::gen_range`] can be more efficient.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":103931,"byte_end":104004,"line_start":131,"line_end":131,"column_start":1,"column_end":74}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":104005,"byte_end":104008,"line_start":132,"line_end":132,"column_start":1,"column_end":4}},{"value":"/ When sampling from a constant range, many calculations can happen at","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":104009,"byte_end":104081,"line_start":133,"line_end":133,"column_start":1,"column_end":73}},{"value":"/ compile-time and all methods should be fast; for floating-point ranges and","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":104082,"byte_end":104160,"line_start":134,"line_end":134,"column_start":1,"column_end":79}},{"value":"/ the full range of integer types this should have comparable performance to","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":104161,"byte_end":104239,"line_start":135,"line_end":135,"column_start":1,"column_end":79}},{"value":"/ the `Standard` distribution.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":104240,"byte_end":104272,"line_start":136,"line_end":136,"column_start":1,"column_end":33}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":104273,"byte_end":104276,"line_start":137,"line_end":137,"column_start":1,"column_end":4}},{"value":"/ Steps are taken to avoid bias which might be present in naive","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":104277,"byte_end":104342,"line_start":138,"line_end":138,"column_start":1,"column_end":66}},{"value":"/ implementations; for example `rng.gen::<u8>() % 170` samples from the range","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":104343,"byte_end":104422,"line_start":139,"line_end":139,"column_start":1,"column_end":80}},{"value":"/ `[0, 169]` but is twice as likely to select numbers less than 85 than other","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":104423,"byte_end":104502,"line_start":140,"line_end":140,"column_start":1,"column_end":80}},{"value":"/ values. Further, the implementations here give more weight to the high-bits","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":104503,"byte_end":104582,"line_start":141,"line_end":141,"column_start":1,"column_end":80}},{"value":"/ generated by the RNG than the low bits, since with some RNGs the low-bits","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":104583,"byte_end":104660,"line_start":142,"line_end":142,"column_start":1,"column_end":78}},{"value":"/ are of lower quality than the high bits.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":104661,"byte_end":104705,"line_start":143,"line_end":143,"column_start":1,"column_end":45}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":104706,"byte_end":104709,"line_start":144,"line_end":144,"column_start":1,"column_end":4}},{"value":"/ Implementations must sample in `[low, high)` range for","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":104710,"byte_end":104768,"line_start":145,"line_end":145,"column_start":1,"column_end":59}},{"value":"/ `Uniform::new(low, high)`, i.e., excluding `high`. In particular, care must","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":104769,"byte_end":104848,"line_start":146,"line_end":146,"column_start":1,"column_end":80}},{"value":"/ be taken to ensure that rounding never results values `< low` or `>= high`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":104849,"byte_end":104928,"line_start":147,"line_end":147,"column_start":1,"column_end":80}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":104929,"byte_end":104932,"line_start":148,"line_end":148,"column_start":1,"column_end":4}},{"value":"/ # Example","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":104933,"byte_end":104946,"line_start":149,"line_end":149,"column_start":1,"column_end":14}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":104947,"byte_end":104950,"line_start":150,"line_end":150,"column_start":1,"column_end":4}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":104951,"byte_end":104958,"line_start":151,"line_end":151,"column_start":1,"column_end":8}},{"value":"/ use rand::distributions::{Distribution, Uniform};","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":104959,"byte_end":105012,"line_start":152,"line_end":152,"column_start":1,"column_end":54}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":105013,"byte_end":105016,"line_start":153,"line_end":153,"column_start":1,"column_end":4}},{"value":"/ let between = Uniform::from(10..10000);","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":105017,"byte_end":105060,"line_start":154,"line_end":154,"column_start":1,"column_end":44}},{"value":"/ let mut rng = rand::thread_rng();","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":105061,"byte_end":105098,"line_start":155,"line_end":155,"column_start":1,"column_end":38}},{"value":"/ let mut sum = 0;","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":105099,"byte_end":105119,"line_start":156,"line_end":156,"column_start":1,"column_end":21}},{"value":"/ for _ in 0..1000 {","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":105120,"byte_end":105142,"line_start":157,"line_end":157,"column_start":1,"column_end":23}},{"value":"/ sum += between.sample(&mut rng);","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":105143,"byte_end":105183,"line_start":158,"line_end":158,"column_start":1,"column_end":41}},{"value":"/ }","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":105184,"byte_end":105189,"line_start":159,"line_end":159,"column_start":1,"column_end":6}},{"value":"/ println!(\"{}\", sum);","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":105190,"byte_end":105214,"line_start":160,"line_end":160,"column_start":1,"column_end":25}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":105215,"byte_end":105222,"line_start":161,"line_end":161,"column_start":1,"column_end":8}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":105223,"byte_end":105226,"line_start":162,"line_end":162,"column_start":1,"column_end":4}},{"value":"/ For a single sample, [`Rng::gen_range`] may be preferred:","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":105227,"byte_end":105288,"line_start":163,"line_end":163,"column_start":1,"column_end":62}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":105289,"byte_end":105292,"line_start":164,"line_end":164,"column_start":1,"column_end":4}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":105293,"byte_end":105300,"line_start":165,"line_end":165,"column_start":1,"column_end":8}},{"value":"/ use rand::Rng;","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":105301,"byte_end":105319,"line_start":166,"line_end":166,"column_start":1,"column_end":19}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":105320,"byte_end":105323,"line_start":167,"line_end":167,"column_start":1,"column_end":4}},{"value":"/ let mut rng = rand::thread_rng();","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":105324,"byte_end":105361,"line_start":168,"line_end":168,"column_start":1,"column_end":38}},{"value":"/ println!(\"{}\", rng.gen_range(0..10));","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":105362,"byte_end":105403,"line_start":169,"line_end":169,"column_start":1,"column_end":42}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":105404,"byte_end":105411,"line_start":170,"line_end":170,"column_start":1,"column_end":8}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":105412,"byte_end":105415,"line_start":171,"line_end":171,"column_start":1,"column_end":4}},{"value":"/ [`new`]: Uniform::new","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":105416,"byte_end":105441,"line_start":172,"line_end":172,"column_start":1,"column_end":26}},{"value":"/ [`new_inclusive`]: Uniform::new_inclusive","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":105442,"byte_end":105487,"line_start":173,"line_end":173,"column_start":1,"column_end":46}},{"value":"/ [`Rng::gen_range`]: Rng::gen_range","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":105488,"byte_end":105526,"line_start":174,"line_end":174,"column_start":1,"column_end":39}}]},{"kind":"Method","id":{"krate":0,"index":371},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":106061,"byte_end":106064,"line_start":184,"line_end":184,"column_start":12,"column_end":15},"name":"new","qualname":"<Uniform<X>>::new","value":"pub fn new<B1, B2>(B1, B2) -> Uniform<X> where B1: SampleBorrow<X> + Sized,\nB2: SampleBorrow<X> + Sized","parent":null,"children":[],"decl_id":null,"docs":" Create a new `Uniform` instance which samples uniformly from the half\n open range `[low, high)` (excluding `high`). Panics if `low >= high`.\n","sig":null,"attributes":[{"value":"/ Create a new `Uniform` instance which samples uniformly from the half","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":105898,"byte_end":105971,"line_start":182,"line_end":182,"column_start":5,"column_end":78}},{"value":"/ open range `[low, high)` (excluding `high`). Panics if `low >= high`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":105976,"byte_end":106049,"line_start":183,"line_end":183,"column_start":5,"column_end":78}}]},{"kind":"Method","id":{"krate":0,"index":374},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":106403,"byte_end":106416,"line_start":194,"line_end":194,"column_start":12,"column_end":25},"name":"new_inclusive","qualname":"<Uniform<X>>::new_inclusive","value":"pub fn new_inclusive<B1, B2>(B1, B2) -> Uniform<X> where B1: SampleBorrow<X> +\nSized, B2: SampleBorrow<X> + Sized","parent":null,"children":[],"decl_id":null,"docs":" Create a new `Uniform` instance which samples uniformly from the closed\n range `[low, high]` (inclusive). Panics if `low > high`.\n","sig":null,"attributes":[{"value":"/ Create a new `Uniform` instance which samples uniformly from the closed","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":106251,"byte_end":106326,"line_start":192,"line_end":192,"column_start":5,"column_end":80}},{"value":"/ range `[low, high]` (inclusive). Panics if `low > high`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":106331,"byte_end":106391,"line_start":193,"line_end":193,"column_start":5,"column_end":65}}]},{"kind":"Trait","id":{"krate":0,"index":381},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":107062,"byte_end":107075,"line_start":216,"line_end":216,"column_start":11,"column_end":24},"name":"SampleUniform","qualname":"::distributions::uniform::SampleUniform","value":"SampleUniform: Sized","parent":null,"children":[{"krate":0,"index":382}],"decl_id":null,"docs":" Helper trait for creating objects using the correct implementation of\n [`UniformSampler`] for the sampling type.","sig":null,"attributes":[{"value":"/ Helper trait for creating objects using the correct implementation of","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":106761,"byte_end":106834,"line_start":209,"line_end":209,"column_start":1,"column_end":74}},{"value":"/ [`UniformSampler`] for the sampling type.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":106835,"byte_end":106880,"line_start":210,"line_end":210,"column_start":1,"column_end":46}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":106881,"byte_end":106884,"line_start":211,"line_end":211,"column_start":1,"column_end":4}},{"value":"/ See the [module documentation] on how to implement [`Uniform`] range","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":106885,"byte_end":106957,"line_start":212,"line_end":212,"column_start":1,"column_end":73}},{"value":"/ sampling for a custom type.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":106958,"byte_end":106989,"line_start":213,"line_end":213,"column_start":1,"column_end":32}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":106990,"byte_end":106993,"line_start":214,"line_end":214,"column_start":1,"column_end":4}},{"value":"/ [module documentation]: crate::distributions::uniform","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":106994,"byte_end":107051,"line_start":215,"line_end":215,"column_start":1,"column_end":58}}]},{"kind":"Type","id":{"krate":0,"index":382},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":107159,"byte_end":107166,"line_start":218,"line_end":218,"column_start":10,"column_end":17},"name":"Sampler","qualname":"::distributions::uniform::SampleUniform::Sampler","value":"type Sampler: UniformSampler<X = Self>;","parent":{"krate":0,"index":381},"children":[],"decl_id":null,"docs":" The `UniformSampler` implementation supporting type `X`.\n","sig":null,"attributes":[{"value":"/ The `UniformSampler` implementation supporting type `X`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":107089,"byte_end":107149,"line_start":217,"line_end":217,"column_start":5,"column_end":65}}]},{"kind":"Trait","id":{"krate":0,"index":383},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":107641,"byte_end":107655,"line_start":231,"line_end":231,"column_start":11,"column_end":25},"name":"UniformSampler","qualname":"::distributions::uniform::UniformSampler","value":"UniformSampler: Sized","parent":null,"children":[{"krate":0,"index":384},{"krate":0,"index":385},{"krate":0,"index":388},{"krate":0,"index":391},{"krate":0,"index":393},{"krate":0,"index":397}],"decl_id":null,"docs":" Helper trait handling actual uniform sampling.","sig":null,"attributes":[{"value":"/ Helper trait handling actual uniform sampling.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":107197,"byte_end":107247,"line_start":221,"line_end":221,"column_start":1,"column_end":51}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":107248,"byte_end":107251,"line_start":222,"line_end":222,"column_start":1,"column_end":4}},{"value":"/ See the [module documentation] on how to implement [`Uniform`] range","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":107252,"byte_end":107324,"line_start":223,"line_end":223,"column_start":1,"column_end":73}},{"value":"/ sampling for a custom type.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":107325,"byte_end":107356,"line_start":224,"line_end":224,"column_start":1,"column_end":32}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":107357,"byte_end":107360,"line_start":225,"line_end":225,"column_start":1,"column_end":4}},{"value":"/ Implementation of [`sample_single`] is optional, and is only useful when","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":107361,"byte_end":107437,"line_start":226,"line_end":226,"column_start":1,"column_end":77}},{"value":"/ the implementation can be faster than `Self::new(low, high).sample(rng)`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":107438,"byte_end":107515,"line_start":227,"line_end":227,"column_start":1,"column_end":78}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":107516,"byte_end":107519,"line_start":228,"line_end":228,"column_start":1,"column_end":4}},{"value":"/ [module documentation]: crate::distributions::uniform","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":107520,"byte_end":107577,"line_start":229,"line_end":229,"column_start":1,"column_end":58}},{"value":"/ [`sample_single`]: UniformSampler::sample_single","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":107578,"byte_end":107630,"line_start":230,"line_end":230,"column_start":1,"column_end":53}}]},{"kind":"Type","id":{"krate":0,"index":384},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":107723,"byte_end":107724,"line_start":233,"line_end":233,"column_start":10,"column_end":11},"name":"X","qualname":"::distributions::uniform::UniformSampler::X","value":"type X;","parent":{"krate":0,"index":383},"children":[],"decl_id":null,"docs":" The type sampled by this implementation.\n","sig":null,"attributes":[{"value":"/ The type sampled by this implementation.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":107669,"byte_end":107713,"line_start":232,"line_end":232,"column_start":5,"column_end":49}}]},{"kind":"Method","id":{"krate":0,"index":385},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":107987,"byte_end":107990,"line_start":240,"line_end":240,"column_start":8,"column_end":11},"name":"new","qualname":"::distributions::uniform::UniformSampler::new","value":"pub fn new<B1, B2>(B1, B2) -> Self where B1: SampleBorrow<Self::X> + Sized,\nB2: SampleBorrow<Self::X> + Sized","parent":{"krate":0,"index":383},"children":[],"decl_id":null,"docs":" Construct self, with inclusive lower bound and exclusive upper bound\n `[low, high)`.","sig":null,"attributes":[{"value":"/ Construct self, with inclusive lower bound and exclusive upper bound","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":107731,"byte_end":107803,"line_start":235,"line_end":235,"column_start":5,"column_end":77}},{"value":"/ `[low, high)`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":107808,"byte_end":107826,"line_start":236,"line_end":236,"column_start":5,"column_end":23}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":107831,"byte_end":107834,"line_start":237,"line_end":237,"column_start":5,"column_end":8}},{"value":"/ Usually users should not call this directly but instead use","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":107839,"byte_end":107902,"line_start":238,"line_end":238,"column_start":5,"column_end":68}},{"value":"/ `Uniform::new`, which asserts that `low < high` before calling this.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":107907,"byte_end":107979,"line_start":239,"line_end":239,"column_start":5,"column_end":77}}]},{"kind":"Method","id":{"krate":0,"index":388},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":108363,"byte_end":108376,"line_start":250,"line_end":250,"column_start":8,"column_end":21},"name":"new_inclusive","qualname":"::distributions::uniform::UniformSampler::new_inclusive","value":"pub fn new_inclusive<B1, B2>(B1, B2) -> Self where B1: SampleBorrow<Self::X> +\nSized, B2: SampleBorrow<Self::X> + Sized","parent":{"krate":0,"index":383},"children":[],"decl_id":null,"docs":" Construct self, with inclusive bounds `[low, high]`.","sig":null,"attributes":[{"value":"/ Construct self, with inclusive bounds `[low, high]`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":108127,"byte_end":108183,"line_start":245,"line_end":245,"column_start":5,"column_end":61}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":108188,"byte_end":108191,"line_start":246,"line_end":246,"column_start":5,"column_end":8}},{"value":"/ Usually users should not call this directly but instead use","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":108196,"byte_end":108259,"line_start":247,"line_end":247,"column_start":5,"column_end":68}},{"value":"/ `Uniform::new_inclusive`, which asserts that `low <= high` before","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":108264,"byte_end":108333,"line_start":248,"line_end":248,"column_start":5,"column_end":74}},{"value":"/ calling this.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":108338,"byte_end":108355,"line_start":249,"line_end":249,"column_start":5,"column_end":22}}]},{"kind":"Method","id":{"krate":0,"index":391},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":108540,"byte_end":108546,"line_start":256,"line_end":256,"column_start":8,"column_end":14},"name":"sample","qualname":"::distributions::uniform::UniformSampler::sample","value":"pub fn sample<R: Rng + ?Sized>(&Self, &mut R) -> Self::X","parent":{"krate":0,"index":383},"children":[],"decl_id":null,"docs":" Sample a value.\n","sig":null,"attributes":[{"value":"/ Sample a value.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":108513,"byte_end":108532,"line_start":255,"line_end":255,"column_start":5,"column_end":24}}]},{"kind":"Method","id":{"krate":0,"index":393},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":109521,"byte_end":109534,"line_start":277,"line_end":277,"column_start":8,"column_end":21},"name":"sample_single","qualname":"::distributions::uniform::UniformSampler::sample_single","value":"pub fn sample_single<R: Rng + ?Sized, B1, B2>(B1, B2, &mut R) -> Self::X where\nB1: SampleBorrow<Self::X> + Sized, B2: SampleBorrow<Self::X> + Sized","parent":{"krate":0,"index":383},"children":[],"decl_id":null,"docs":" Sample a single value uniformly from a range with inclusive lower bound\n and exclusive upper bound `[low, high)`.","sig":null,"attributes":[{"value":"/ Sample a single value uniformly from a range with inclusive lower bound","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":108601,"byte_end":108676,"line_start":258,"line_end":258,"column_start":5,"column_end":80}},{"value":"/ and exclusive upper bound `[low, high)`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":108681,"byte_end":108725,"line_start":259,"line_end":259,"column_start":5,"column_end":49}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":108730,"byte_end":108733,"line_start":260,"line_end":260,"column_start":5,"column_end":8}},{"value":"/ By default this is implemented using","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":108738,"byte_end":108778,"line_start":261,"line_end":261,"column_start":5,"column_end":45}},{"value":"/ `UniformSampler::new(low, high).sample(rng)`. However, for some types","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":108783,"byte_end":108856,"line_start":262,"line_end":262,"column_start":5,"column_end":78}},{"value":"/ more optimal implementations for single usage may be provided via this","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":108861,"byte_end":108935,"line_start":263,"line_end":263,"column_start":5,"column_end":79}},{"value":"/ method (which is the case for integers and floats).","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":108940,"byte_end":108995,"line_start":264,"line_end":264,"column_start":5,"column_end":60}},{"value":"/ Results may not be identical.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":109000,"byte_end":109033,"line_start":265,"line_end":265,"column_start":5,"column_end":38}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":109038,"byte_end":109041,"line_start":266,"line_end":266,"column_start":5,"column_end":8}},{"value":"/ Note that to use this method in a generic context, the type needs to be","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":109046,"byte_end":109121,"line_start":267,"line_end":267,"column_start":5,"column_end":80}},{"value":"/ retrieved via `SampleUniform::Sampler` as follows:","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":109126,"byte_end":109180,"line_start":268,"line_end":268,"column_start":5,"column_end":59}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":109185,"byte_end":109192,"line_start":269,"line_end":269,"column_start":5,"column_end":12}},{"value":"/ use rand::{thread_rng, distributions::uniform::{SampleUniform, UniformSampler}};","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":109197,"byte_end":109281,"line_start":270,"line_end":270,"column_start":5,"column_end":89}},{"value":"/ # #[allow(unused)]","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":109286,"byte_end":109308,"line_start":271,"line_end":271,"column_start":5,"column_end":27}},{"value":"/ fn sample_from_range<T: SampleUniform>(lb: T, ub: T) -> T {","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":109313,"byte_end":109376,"line_start":272,"line_end":272,"column_start":5,"column_end":68}},{"value":"/ let mut rng = thread_rng();","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":109381,"byte_end":109416,"line_start":273,"line_end":273,"column_start":5,"column_end":40}},{"value":"/ <T as SampleUniform>::Sampler::sample_single(lb, ub, &mut rng)","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":109421,"byte_end":109491,"line_start":274,"line_end":274,"column_start":5,"column_end":75}},{"value":"/ }","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":109496,"byte_end":109501,"line_start":275,"line_end":275,"column_start":5,"column_end":10}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":109506,"byte_end":109513,"line_start":276,"line_end":276,"column_start":5,"column_end":12}}]},{"kind":"Method","id":{"krate":0,"index":397},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":110210,"byte_end":110233,"line_start":294,"line_end":294,"column_start":8,"column_end":31},"name":"sample_single_inclusive","qualname":"::distributions::uniform::UniformSampler::sample_single_inclusive","value":"pub fn sample_single_inclusive<R: Rng + ?Sized, B1, B2>(B1, B2, &mut R)\n-> Self::X where B1: SampleBorrow<Self::X> + Sized,\nB2: SampleBorrow<Self::X> + Sized","parent":{"krate":0,"index":383},"children":[],"decl_id":null,"docs":" Sample a single value uniformly from a range with inclusive lower bound\n and inclusive upper bound `[low, high]`.","sig":null,"attributes":[{"value":"/ Sample a single value uniformly from a range with inclusive lower bound","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":109804,"byte_end":109879,"line_start":286,"line_end":286,"column_start":5,"column_end":80}},{"value":"/ and inclusive upper bound `[low, high]`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":109884,"byte_end":109928,"line_start":287,"line_end":287,"column_start":5,"column_end":49}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":109933,"byte_end":109936,"line_start":288,"line_end":288,"column_start":5,"column_end":8}},{"value":"/ By default this is implemented using","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":109941,"byte_end":109981,"line_start":289,"line_end":289,"column_start":5,"column_end":45}},{"value":"/ `UniformSampler::new_inclusive(low, high).sample(rng)`. However, for","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":109986,"byte_end":110058,"line_start":290,"line_end":290,"column_start":5,"column_end":77}},{"value":"/ some types more optimal implementations for single usage may be provided","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":110063,"byte_end":110139,"line_start":291,"line_end":291,"column_start":5,"column_end":81}},{"value":"/ via this method.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":110144,"byte_end":110164,"line_start":292,"line_end":292,"column_start":5,"column_end":25}},{"value":"/ Results may not be identical.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":110169,"byte_end":110202,"line_start":293,"line_end":293,"column_start":5,"column_end":38}}]},{"kind":"Trait","id":{"krate":0,"index":407},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":111069,"byte_end":111081,"line_start":322,"line_end":322,"column_start":11,"column_end":23},"name":"SampleBorrow","qualname":"::distributions::uniform::SampleBorrow","value":"SampleBorrow<Borrowed>","parent":null,"children":[{"krate":0,"index":409}],"decl_id":null,"docs":" Helper trait similar to [`Borrow`] but implemented\n only for SampleUniform and references to SampleUniform in\n order to resolve ambiguity issues.","sig":null,"attributes":[{"value":"/ Helper trait similar to [`Borrow`] but implemented","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":110863,"byte_end":110917,"line_start":317,"line_end":317,"column_start":1,"column_end":55}},{"value":"/ only for SampleUniform and references to SampleUniform in","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":110918,"byte_end":110979,"line_start":318,"line_end":318,"column_start":1,"column_end":62}},{"value":"/ order to resolve ambiguity issues.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":110980,"byte_end":111018,"line_start":319,"line_end":319,"column_start":1,"column_end":39}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":111019,"byte_end":111022,"line_start":320,"line_end":320,"column_start":1,"column_end":4}},{"value":"/ [`Borrow`]: std::borrow::Borrow","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":111023,"byte_end":111058,"line_start":321,"line_end":321,"column_start":1,"column_end":36}}]},{"kind":"Method","id":{"krate":0,"index":409},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":111235,"byte_end":111241,"line_start":326,"line_end":326,"column_start":8,"column_end":14},"name":"borrow","qualname":"::distributions::uniform::SampleBorrow::borrow","value":"pub fn borrow(&Self) -> &Borrowed","parent":{"krate":0,"index":407},"children":[],"decl_id":null,"docs":" Immutably borrows from an owned value. See [`Borrow::borrow`]","sig":null,"attributes":[{"value":"/ Immutably borrows from an owned value. See [`Borrow::borrow`]","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":111098,"byte_end":111163,"line_start":323,"line_end":323,"column_start":5,"column_end":70}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":111168,"byte_end":111171,"line_start":324,"line_end":324,"column_start":5,"column_end":8}},{"value":"/ [`Borrow::borrow`]: std::borrow::Borrow::borrow","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":111176,"byte_end":111227,"line_start":325,"line_end":325,"column_start":5,"column_end":56}}]},{"kind":"Trait","id":{"krate":0,"index":417},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":111781,"byte_end":111792,"line_start":349,"line_end":349,"column_start":11,"column_end":22},"name":"SampleRange","qualname":"::distributions::uniform::SampleRange","value":"SampleRange<T>","parent":null,"children":[{"krate":0,"index":419},{"krate":0,"index":421}],"decl_id":null,"docs":" Range that supports generating a single sample efficiently.","sig":null,"attributes":[{"value":"/ Range that supports generating a single sample efficiently.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":111599,"byte_end":111662,"line_start":345,"line_end":345,"column_start":1,"column_end":64}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":111663,"byte_end":111666,"line_start":346,"line_end":346,"column_start":1,"column_end":4}},{"value":"/ Any type implementing this trait can be used to specify the sampled range","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":111667,"byte_end":111744,"line_start":347,"line_end":347,"column_start":1,"column_end":78}},{"value":"/ for `Rng::gen_range`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":111745,"byte_end":111770,"line_start":348,"line_end":348,"column_start":1,"column_end":26}}]},{"kind":"Method","id":{"krate":0,"index":419},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":111853,"byte_end":111866,"line_start":351,"line_end":351,"column_start":8,"column_end":21},"name":"sample_single","qualname":"::distributions::uniform::SampleRange::sample_single","value":"pub fn sample_single<R: RngCore + ?Sized>(Self, &mut R) -> T","parent":{"krate":0,"index":417},"children":[],"decl_id":null,"docs":" Generate a sample from the given range.\n","sig":null,"attributes":[{"value":"/ Generate a sample from the given range.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":111802,"byte_end":111845,"line_start":350,"line_end":350,"column_start":5,"column_end":48}}]},{"kind":"Method","id":{"krate":0,"index":421},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":111963,"byte_end":111971,"line_start":354,"line_end":354,"column_start":8,"column_end":16},"name":"is_empty","qualname":"::distributions::uniform::SampleRange::is_empty","value":"pub fn is_empty(&Self) -> bool","parent":{"krate":0,"index":417},"children":[],"decl_id":null,"docs":" Check whether the range is empty.\n","sig":null,"attributes":[{"value":"/ Check whether the range is empty.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":111918,"byte_end":111955,"line_start":353,"line_end":353,"column_start":5,"column_end":42}}]},{"kind":"Struct","id":{"krate":0,"index":1701},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":114769,"byte_end":114779,"line_start":423,"line_end":423,"column_start":12,"column_end":22},"name":"UniformInt","qualname":"::distributions::uniform::UniformInt","value":"UniformInt { }","parent":null,"children":[{"krate":0,"index":1703},{"krate":0,"index":1704},{"krate":0,"index":1705}],"decl_id":null,"docs":" The back-end implementing [`UniformSampler`] for integer types.","sig":null,"attributes":[{"value":"/ The back-end implementing [`UniformSampler`] for integer types.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":112749,"byte_end":112816,"line_start":387,"line_end":387,"column_start":1,"column_end":68}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":112817,"byte_end":112820,"line_start":388,"line_end":388,"column_start":1,"column_end":4}},{"value":"/ Unless you are implementing [`UniformSampler`] for your own type, this type","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":112821,"byte_end":112900,"line_start":389,"line_end":389,"column_start":1,"column_end":80}},{"value":"/ should not be used directly, use [`Uniform`] instead.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":112901,"byte_end":112958,"line_start":390,"line_end":390,"column_start":1,"column_end":58}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":112959,"byte_end":112962,"line_start":391,"line_end":391,"column_start":1,"column_end":4}},{"value":"/ # Implementation notes","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":112963,"byte_end":112989,"line_start":392,"line_end":392,"column_start":1,"column_end":27}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":112990,"byte_end":112993,"line_start":393,"line_end":393,"column_start":1,"column_end":4}},{"value":"/ For simplicity, we use the same generic struct `UniformInt<X>` for all","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":112994,"byte_end":113068,"line_start":394,"line_end":394,"column_start":1,"column_end":75}},{"value":"/ integer types `X`. This gives us only one field type, `X`; to store unsigned","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":113069,"byte_end":113149,"line_start":395,"line_end":395,"column_start":1,"column_end":81}},{"value":"/ values of this size, we take use the fact that these conversions are no-ops.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":113150,"byte_end":113230,"line_start":396,"line_end":396,"column_start":1,"column_end":81}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":113231,"byte_end":113234,"line_start":397,"line_end":397,"column_start":1,"column_end":4}},{"value":"/ For a closed range, the number of possible numbers we should generate is","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":113235,"byte_end":113311,"line_start":398,"line_end":398,"column_start":1,"column_end":77}},{"value":"/ `range = (high - low + 1)`. To avoid bias, we must ensure that the size of","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":113312,"byte_end":113390,"line_start":399,"line_end":399,"column_start":1,"column_end":79}},{"value":"/ our sample space, `zone`, is a multiple of `range`; other values must be","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":113391,"byte_end":113467,"line_start":400,"line_end":400,"column_start":1,"column_end":77}},{"value":"/ rejected (by replacing with a new random sample).","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":113468,"byte_end":113521,"line_start":401,"line_end":401,"column_start":1,"column_end":54}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":113522,"byte_end":113525,"line_start":402,"line_end":402,"column_start":1,"column_end":4}},{"value":"/ As a special case, we use `range = 0` to represent the full range of the","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":113526,"byte_end":113602,"line_start":403,"line_end":403,"column_start":1,"column_end":77}},{"value":"/ result type (i.e. for `new_inclusive($ty::MIN, $ty::MAX)`).","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":113603,"byte_end":113666,"line_start":404,"line_end":404,"column_start":1,"column_end":64}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":113667,"byte_end":113670,"line_start":405,"line_end":405,"column_start":1,"column_end":4}},{"value":"/ The optimum `zone` is the largest product of `range` which fits in our","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":113671,"byte_end":113745,"line_start":406,"line_end":406,"column_start":1,"column_end":75}},{"value":"/ (unsigned) target type. We calculate this by calculating how many numbers we","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":113746,"byte_end":113826,"line_start":407,"line_end":407,"column_start":1,"column_end":81}},{"value":"/ must reject: `reject = (MAX + 1) % range = (MAX - range + 1) % range`. Any (large)","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":113827,"byte_end":113913,"line_start":408,"line_end":408,"column_start":1,"column_end":87}},{"value":"/ product of `range` will suffice, thus in `sample_single` we multiply by a","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":113914,"byte_end":113991,"line_start":409,"line_end":409,"column_start":1,"column_end":78}},{"value":"/ power of 2 via bit-shifting (faster but may cause more rejections).","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":113992,"byte_end":114063,"line_start":410,"line_end":410,"column_start":1,"column_end":72}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":114064,"byte_end":114067,"line_start":411,"line_end":411,"column_start":1,"column_end":4}},{"value":"/ The smallest integer PRNGs generate is `u32`. For 8- and 16-bit outputs we","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":114068,"byte_end":114146,"line_start":412,"line_end":412,"column_start":1,"column_end":79}},{"value":"/ use `u32` for our `zone` and samples (because it's not slower and because","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":114147,"byte_end":114224,"line_start":413,"line_end":413,"column_start":1,"column_end":78}},{"value":"/ it reduces the chance of having to reject a sample). In this case we cannot","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":114225,"byte_end":114304,"line_start":414,"line_end":414,"column_start":1,"column_end":80}},{"value":"/ store `zone` in the target type since it is too large, however we know","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":114305,"byte_end":114379,"line_start":415,"line_end":415,"column_start":1,"column_end":75}},{"value":"/ `ints_to_reject < range <= $unsigned::MAX`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":114380,"byte_end":114427,"line_start":416,"line_end":416,"column_start":1,"column_end":48}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":114428,"byte_end":114431,"line_start":417,"line_end":417,"column_start":1,"column_end":4}},{"value":"/ An alternative to using a modulus is widening multiply: After a widening","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":114432,"byte_end":114508,"line_start":418,"line_end":418,"column_start":1,"column_end":77}},{"value":"/ multiply by `range`, the result is in the high word. Then comparing the low","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":114509,"byte_end":114588,"line_start":419,"line_end":419,"column_start":1,"column_end":80}},{"value":"/ word against `zone` makes sure our distribution is uniform.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":114589,"byte_end":114652,"line_start":420,"line_end":420,"column_start":1,"column_end":64}}]},{"kind":"Struct","id":{"krate":0,"index":1960},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":126959,"byte_end":126970,"line_start":732,"line_end":732,"column_start":12,"column_end":23},"name":"UniformChar","qualname":"::distributions::uniform::UniformChar","value":"UniformChar { }","parent":null,"children":[{"krate":0,"index":1961}],"decl_id":null,"docs":" The back-end implementing [`UniformSampler`] for `char`.","sig":null,"attributes":[{"value":"/ The back-end implementing [`UniformSampler`] for `char`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":126401,"byte_end":126461,"line_start":721,"line_end":721,"column_start":1,"column_end":61}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":126462,"byte_end":126465,"line_start":722,"line_end":722,"column_start":1,"column_end":4}},{"value":"/ Unless you are implementing [`UniformSampler`] for your own type, this type","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":126466,"byte_end":126545,"line_start":723,"line_end":723,"column_start":1,"column_end":80}},{"value":"/ should not be used directly, use [`Uniform`] instead.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":126546,"byte_end":126603,"line_start":724,"line_end":724,"column_start":1,"column_end":58}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":126604,"byte_end":126607,"line_start":725,"line_end":725,"column_start":1,"column_end":4}},{"value":"/ This differs from integer range sampling since the range `0xD800..=0xDFFF`","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":126608,"byte_end":126686,"line_start":726,"line_end":726,"column_start":1,"column_end":79}},{"value":"/ are used for surrogate pairs in UCS and UTF-16, and consequently are not","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":126687,"byte_end":126763,"line_start":727,"line_end":727,"column_start":1,"column_end":77}},{"value":"/ valid Unicode code points. We must therefore avoid sampling values in this","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":126764,"byte_end":126842,"line_start":728,"line_end":728,"column_start":1,"column_end":79}},{"value":"/ range.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":126843,"byte_end":126853,"line_start":729,"line_end":729,"column_start":1,"column_end":11}}]},{"kind":"Struct","id":{"krate":0,"index":1967},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":129853,"byte_end":129865,"line_start":811,"line_end":811,"column_start":12,"column_end":24},"name":"UniformFloat","qualname":"::distributions::uniform::UniformFloat","value":"UniformFloat { }","parent":null,"children":[{"krate":0,"index":1969},{"krate":0,"index":1970}],"decl_id":null,"docs":" The back-end implementing [`UniformSampler`] for floating-point types.","sig":null,"attributes":[{"value":"/ The back-end implementing [`UniformSampler`] for floating-point types.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":128852,"byte_end":128926,"line_start":790,"line_end":790,"column_start":1,"column_end":75}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":128927,"byte_end":128930,"line_start":791,"line_end":791,"column_start":1,"column_end":4}},{"value":"/ Unless you are implementing [`UniformSampler`] for your own type, this type","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":128931,"byte_end":129010,"line_start":792,"line_end":792,"column_start":1,"column_end":80}},{"value":"/ should not be used directly, use [`Uniform`] instead.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":129011,"byte_end":129068,"line_start":793,"line_end":793,"column_start":1,"column_end":58}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":129069,"byte_end":129072,"line_start":794,"line_end":794,"column_start":1,"column_end":4}},{"value":"/ # Implementation notes","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":129073,"byte_end":129099,"line_start":795,"line_end":795,"column_start":1,"column_end":27}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":129100,"byte_end":129103,"line_start":796,"line_end":796,"column_start":1,"column_end":4}},{"value":"/ Instead of generating a float in the `[0, 1)` range using [`Standard`], the","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":129104,"byte_end":129183,"line_start":797,"line_end":797,"column_start":1,"column_end":80}},{"value":"/ `UniformFloat` implementation converts the output of an PRNG itself. This","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":129184,"byte_end":129261,"line_start":798,"line_end":798,"column_start":1,"column_end":78}},{"value":"/ way one or two steps can be optimized out.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":129262,"byte_end":129308,"line_start":799,"line_end":799,"column_start":1,"column_end":47}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":129309,"byte_end":129312,"line_start":800,"line_end":800,"column_start":1,"column_end":4}},{"value":"/ The floats are first converted to a value in the `[1, 2)` interval using a","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":129313,"byte_end":129391,"line_start":801,"line_end":801,"column_start":1,"column_end":79}},{"value":"/ transmute-based method, and then mapped to the expected range with a","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":129392,"byte_end":129464,"line_start":802,"line_end":802,"column_start":1,"column_end":73}},{"value":"/ multiply and addition. Values produced this way have what equals 23 bits of","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":129465,"byte_end":129544,"line_start":803,"line_end":803,"column_start":1,"column_end":80}},{"value":"/ random digits for an `f32`, and 52 for an `f64`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":129545,"byte_end":129597,"line_start":804,"line_end":804,"column_start":1,"column_end":53}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":129598,"byte_end":129601,"line_start":805,"line_end":805,"column_start":1,"column_end":4}},{"value":"/ [`new`]: UniformSampler::new","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":129602,"byte_end":129634,"line_start":806,"line_end":806,"column_start":1,"column_end":33}},{"value":"/ [`new_inclusive`]: UniformSampler::new_inclusive","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":129635,"byte_end":129687,"line_start":807,"line_end":807,"column_start":1,"column_end":53}},{"value":"/ [`Standard`]: crate::distributions::Standard","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":129688,"byte_end":129736,"line_start":808,"line_end":808,"column_start":1,"column_end":49}}]},{"kind":"Struct","id":{"krate":0,"index":2017},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":138875,"byte_end":138890,"line_start":1024,"line_end":1024,"column_start":12,"column_end":27},"name":"UniformDuration","qualname":"::distributions::uniform::UniformDuration","value":"UniformDuration { }","parent":null,"children":[{"krate":0,"index":2018},{"krate":0,"index":2019}],"decl_id":null,"docs":" The back-end implementing [`UniformSampler`] for `Duration`.","sig":null,"attributes":[{"value":"/ The back-end implementing [`UniformSampler`] for `Duration`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":138562,"byte_end":138626,"line_start":1018,"line_end":1018,"column_start":1,"column_end":65}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":138627,"byte_end":138630,"line_start":1019,"line_end":1019,"column_start":1,"column_end":4}},{"value":"/ Unless you are implementing [`UniformSampler`] for your own types, this type","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":138631,"byte_end":138711,"line_start":1020,"line_end":1020,"column_start":1,"column_end":81}},{"value":"/ should not be used directly, use [`Uniform`] instead.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":138712,"byte_end":138769,"line_start":1021,"line_end":1021,"column_start":1,"column_end":58}}]},{"kind":"Mod","id":{"krate":0,"index":462},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1},"name":"weighted","qualname":"::distributions::weighted","value":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted.rs","parent":null,"children":[{"krate":0,"index":463},{"krate":0,"index":464},{"krate":0,"index":467},{"krate":0,"index":470}],"decl_id":null,"docs":" Weighted index sampling","sig":null,"attributes":[{"value":"deprecated(since = \"0.8.0\", note =\n \"use rand::distributions::{WeightedIndex, WeightedError} instead\")","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":11289,"byte_end":11403,"line_start":111,"line_end":114,"column_start":1,"column_end":3}},{"value":"cfg(feature = \"alloc\")","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":11404,"byte_end":11429,"line_start":115,"line_end":115,"column_start":1,"column_end":26}},{"value":"/ Weighted index sampling","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted.rs","byte_start":161958,"byte_end":161985,"line_start":9,"line_end":9,"column_start":1,"column_end":28}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted.rs","byte_start":161986,"byte_end":161989,"line_start":10,"line_end":10,"column_start":1,"column_end":4}},{"value":"/ This module is deprecated. Use [`crate::distributions::WeightedIndex`] and","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted.rs","byte_start":161990,"byte_end":162068,"line_start":11,"line_end":11,"column_start":1,"column_end":79}},{"value":"/ [`crate::distributions::WeightedError`] instead.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted.rs","byte_start":162069,"byte_end":162121,"line_start":12,"line_end":12,"column_start":1,"column_end":53}}]},{"kind":"Mod","id":{"krate":0,"index":470},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted.rs","byte_start":162269,"byte_end":162281,"line_start":18,"line_end":18,"column_start":9,"column_end":21},"name":"alias_method","qualname":"::distributions::weighted::alias_method","value":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted.rs","parent":null,"children":[{"krate":0,"index":471},{"krate":0,"index":472},{"krate":0,"index":474},{"krate":0,"index":477},{"krate":0,"index":2040},{"krate":0,"index":2043},{"krate":0,"index":480},{"krate":0,"index":483},{"krate":0,"index":484},{"krate":0,"index":2046},{"krate":0,"index":2047},{"krate":0,"index":2048},{"krate":0,"index":2049},{"krate":0,"index":2050},{"krate":0,"index":2051},{"krate":0,"index":2052},{"krate":0,"index":2053},{"krate":0,"index":2054},{"krate":0,"index":2055},{"krate":0,"index":2056},{"krate":0,"index":2057},{"krate":0,"index":2058},{"krate":0,"index":2059}],"decl_id":null,"docs":"","sig":null,"attributes":[{"value":"allow(missing_docs)","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted.rs","byte_start":162171,"byte_end":162193,"line_start":16,"line_end":16,"column_start":1,"column_end":23}},{"value":"deprecated(since = \"0.8.0\", note = \"moved to rand_distr crate\")","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted.rs","byte_start":162194,"byte_end":162260,"line_start":17,"line_end":17,"column_start":1,"column_end":67}}]},{"kind":"Struct","id":{"krate":0,"index":2040},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted.rs","byte_start":162550,"byte_end":162563,"line_start":26,"line_end":26,"column_start":16,"column_end":29},"name":"WeightedIndex","qualname":"::distributions::weighted::alias_method::WeightedIndex","value":"WeightedIndex { }","parent":null,"children":[{"krate":0,"index":2042}],"decl_id":null,"docs":"","sig":null,"attributes":[]},{"kind":"Method","id":{"krate":0,"index":482},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted.rs","byte_start":162671,"byte_end":162674,"line_start":30,"line_end":30,"column_start":16,"column_end":19},"name":"new","qualname":"<WeightedIndex<W>>::new","value":"pub fn new(Vec<W>) -> Result<Self, WeightedError>","parent":null,"children":[],"decl_id":null,"docs":"","sig":null,"attributes":[]},{"kind":"Trait","id":{"krate":0,"index":483},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted.rs","byte_start":162796,"byte_end":162802,"line_start":35,"line_end":35,"column_start":15,"column_end":21},"name":"Weight","qualname":"::distributions::weighted::alias_method::Weight","value":"Weight","parent":null,"children":[],"decl_id":null,"docs":"","sig":null,"attributes":[]},{"kind":"Struct","id":{"krate":0,"index":2060},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":15701,"byte_end":15709,"line_start":218,"line_end":218,"column_start":12,"column_end":20},"name":"Standard","qualname":"::distributions::Standard","value":"","parent":null,"children":[],"decl_id":null,"docs":" A generic random value distribution, implemented for many primitive types.\n Usually generates values with a numerically uniform distribution, and with a\n range appropriate to the type.","sig":null,"attributes":[{"value":"/ A generic random value distribution, implemented for many primitive types.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":11960,"byte_end":12038,"line_start":134,"line_end":134,"column_start":1,"column_end":79}},{"value":"/ Usually generates values with a numerically uniform distribution, and with a","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":12039,"byte_end":12119,"line_start":135,"line_end":135,"column_start":1,"column_end":81}},{"value":"/ range appropriate to the type.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":12120,"byte_end":12154,"line_start":136,"line_end":136,"column_start":1,"column_end":35}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":12155,"byte_end":12158,"line_start":137,"line_end":137,"column_start":1,"column_end":4}},{"value":"/ ## Provided implementations","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":12159,"byte_end":12190,"line_start":138,"line_end":138,"column_start":1,"column_end":32}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":12191,"byte_end":12194,"line_start":139,"line_end":139,"column_start":1,"column_end":4}},{"value":"/ Assuming the provided `Rng` is well-behaved, these implementations","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":12195,"byte_end":12265,"line_start":140,"line_end":140,"column_start":1,"column_end":71}},{"value":"/ generate values with the following ranges and distributions:","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":12266,"byte_end":12330,"line_start":141,"line_end":141,"column_start":1,"column_end":65}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":12331,"byte_end":12334,"line_start":142,"line_end":142,"column_start":1,"column_end":4}},{"value":"/ * Integers (`i32`, `u32`, `isize`, `usize`, etc.): Uniformly distributed","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":12335,"byte_end":12411,"line_start":143,"line_end":143,"column_start":1,"column_end":77}},{"value":"/ over all values of the type.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":12412,"byte_end":12446,"line_start":144,"line_end":144,"column_start":1,"column_end":35}},{"value":"/ * `char`: Uniformly distributed over all Unicode scalar values, i.e. all","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":12447,"byte_end":12523,"line_start":145,"line_end":145,"column_start":1,"column_end":77}},{"value":"/ code points in the range `0...0x10_FFFF`, except for the range","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":12524,"byte_end":12592,"line_start":146,"line_end":146,"column_start":1,"column_end":69}},{"value":"/ `0xD800...0xDFFF` (the surrogate code points). This includes","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":12593,"byte_end":12659,"line_start":147,"line_end":147,"column_start":1,"column_end":67}},{"value":"/ unassigned/reserved code points.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":12660,"byte_end":12698,"line_start":148,"line_end":148,"column_start":1,"column_end":39}},{"value":"/ * `bool`: Generates `false` or `true`, each with probability 0.5.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":12699,"byte_end":12768,"line_start":149,"line_end":149,"column_start":1,"column_end":70}},{"value":"/ * Floating point types (`f32` and `f64`): Uniformly distributed in the","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":12769,"byte_end":12843,"line_start":150,"line_end":150,"column_start":1,"column_end":75}},{"value":"/ half-open range `[0, 1)`. See notes below.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":12844,"byte_end":12892,"line_start":151,"line_end":151,"column_start":1,"column_end":49}},{"value":"/ * Wrapping integers (`Wrapping<T>`), besides the type identical to their","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":12893,"byte_end":12969,"line_start":152,"line_end":152,"column_start":1,"column_end":77}},{"value":"/ normal integer variants.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":12970,"byte_end":13000,"line_start":153,"line_end":153,"column_start":1,"column_end":31}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":13001,"byte_end":13004,"line_start":154,"line_end":154,"column_start":1,"column_end":4}},{"value":"/ The `Standard` distribution also supports generation of the following","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":13005,"byte_end":13078,"line_start":155,"line_end":155,"column_start":1,"column_end":74}},{"value":"/ compound types where all component types are supported:","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":13079,"byte_end":13138,"line_start":156,"line_end":156,"column_start":1,"column_end":60}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":13139,"byte_end":13142,"line_start":157,"line_end":157,"column_start":1,"column_end":4}},{"value":"/ * Tuples (up to 12 elements): each element is generated sequentially.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":13143,"byte_end":13218,"line_start":158,"line_end":158,"column_start":1,"column_end":76}},{"value":"/ * Arrays (up to 32 elements): each element is generated sequentially;","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":13219,"byte_end":13294,"line_start":159,"line_end":159,"column_start":1,"column_end":76}},{"value":"/ see also [`Rng::fill`] which supports arbitrary array length for integer","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":13295,"byte_end":13375,"line_start":160,"line_end":160,"column_start":1,"column_end":81}},{"value":"/ and float types and tends to be faster for `u32` and smaller types.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":13376,"byte_end":13451,"line_start":161,"line_end":161,"column_start":1,"column_end":76}},{"value":"/ When using `rustc` ≥ 1.51, enable the `min_const_gen` feature to support","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":13452,"byte_end":13534,"line_start":162,"line_end":162,"column_start":1,"column_end":81}},{"value":"/ arrays larger than 32 elements.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":13535,"byte_end":13574,"line_start":163,"line_end":163,"column_start":1,"column_end":40}},{"value":"/ Note that [`Rng::fill`] and `Standard`'s array support are *not* equivalent:","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":13575,"byte_end":13659,"line_start":164,"line_end":164,"column_start":1,"column_end":85}},{"value":"/ the former is optimised for integer types (using fewer RNG calls for","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":13660,"byte_end":13736,"line_start":165,"line_end":165,"column_start":1,"column_end":77}},{"value":"/ element types smaller than the RNG word size), while the latter supports","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":13737,"byte_end":13817,"line_start":166,"line_end":166,"column_start":1,"column_end":81}},{"value":"/ any element type supported by `Standard`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":13818,"byte_end":13867,"line_start":167,"line_end":167,"column_start":1,"column_end":50}},{"value":"/ * `Option<T>` first generates a `bool`, and if true generates and returns","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":13868,"byte_end":13947,"line_start":168,"line_end":168,"column_start":1,"column_end":80}},{"value":"/ `Some(value)` where `value: T`, otherwise returning `None`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":13948,"byte_end":14015,"line_start":169,"line_end":169,"column_start":1,"column_end":68}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":14016,"byte_end":14019,"line_start":170,"line_end":170,"column_start":1,"column_end":4}},{"value":"/ ## Custom implementations","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":14020,"byte_end":14049,"line_start":171,"line_end":171,"column_start":1,"column_end":30}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":14050,"byte_end":14053,"line_start":172,"line_end":172,"column_start":1,"column_end":4}},{"value":"/ The [`Standard`] distribution may be implemented for user types as follows:","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":14054,"byte_end":14133,"line_start":173,"line_end":173,"column_start":1,"column_end":80}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":14134,"byte_end":14137,"line_start":174,"line_end":174,"column_start":1,"column_end":4}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":14138,"byte_end":14145,"line_start":175,"line_end":175,"column_start":1,"column_end":8}},{"value":"/ # #![allow(dead_code)]","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":14146,"byte_end":14172,"line_start":176,"line_end":176,"column_start":1,"column_end":27}},{"value":"/ use rand::Rng;","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":14173,"byte_end":14191,"line_start":177,"line_end":177,"column_start":1,"column_end":19}},{"value":"/ use rand::distributions::{Distribution, Standard};","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":14192,"byte_end":14246,"line_start":178,"line_end":178,"column_start":1,"column_end":55}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":14247,"byte_end":14250,"line_start":179,"line_end":179,"column_start":1,"column_end":4}},{"value":"/ struct MyF32 {","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":14251,"byte_end":14269,"line_start":180,"line_end":180,"column_start":1,"column_end":19}},{"value":"/ x: f32,","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":14270,"byte_end":14285,"line_start":181,"line_end":181,"column_start":1,"column_end":16}},{"value":"/ }","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":14286,"byte_end":14291,"line_start":182,"line_end":182,"column_start":1,"column_end":6}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":14292,"byte_end":14295,"line_start":183,"line_end":183,"column_start":1,"column_end":4}},{"value":"/ impl Distribution<MyF32> for Standard {","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":14296,"byte_end":14339,"line_start":184,"line_end":184,"column_start":1,"column_end":44}},{"value":"/ fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> MyF32 {","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":14340,"byte_end":14405,"line_start":185,"line_end":185,"column_start":1,"column_end":66}},{"value":"/ MyF32 { x: rng.gen() }","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":14406,"byte_end":14440,"line_start":186,"line_end":186,"column_start":1,"column_end":35}},{"value":"/ }","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":14441,"byte_end":14450,"line_start":187,"line_end":187,"column_start":1,"column_end":10}},{"value":"/ }","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":14451,"byte_end":14456,"line_start":188,"line_end":188,"column_start":1,"column_end":6}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":14457,"byte_end":14464,"line_start":189,"line_end":189,"column_start":1,"column_end":8}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":14465,"byte_end":14468,"line_start":190,"line_end":190,"column_start":1,"column_end":4}},{"value":"/ ## Example usage","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":14469,"byte_end":14489,"line_start":191,"line_end":191,"column_start":1,"column_end":21}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":14490,"byte_end":14497,"line_start":192,"line_end":192,"column_start":1,"column_end":8}},{"value":"/ use rand::prelude::*;","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":14498,"byte_end":14523,"line_start":193,"line_end":193,"column_start":1,"column_end":26}},{"value":"/ use rand::distributions::Standard;","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":14524,"byte_end":14562,"line_start":194,"line_end":194,"column_start":1,"column_end":39}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":14563,"byte_end":14566,"line_start":195,"line_end":195,"column_start":1,"column_end":4}},{"value":"/ let val: f32 = StdRng::from_entropy().sample(Standard);","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":14567,"byte_end":14626,"line_start":196,"line_end":196,"column_start":1,"column_end":60}},{"value":"/ println!(\"f32 from [0, 1): {}\", val);","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":14627,"byte_end":14668,"line_start":197,"line_end":197,"column_start":1,"column_end":42}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":14669,"byte_end":14676,"line_start":198,"line_end":198,"column_start":1,"column_end":8}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":14677,"byte_end":14680,"line_start":199,"line_end":199,"column_start":1,"column_end":4}},{"value":"/ # Floating point implementation","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":14681,"byte_end":14716,"line_start":200,"line_end":200,"column_start":1,"column_end":36}},{"value":"/ The floating point implementations for `Standard` generate a random value in","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":14717,"byte_end":14797,"line_start":201,"line_end":201,"column_start":1,"column_end":81}},{"value":"/ the half-open interval `[0, 1)`, i.e. including 0 but not 1.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":14798,"byte_end":14862,"line_start":202,"line_end":202,"column_start":1,"column_end":65}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":14863,"byte_end":14866,"line_start":203,"line_end":203,"column_start":1,"column_end":4}},{"value":"/ All values that can be generated are of the form `n * ε/2`. For `f32`","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":14867,"byte_end":14941,"line_start":204,"line_end":204,"column_start":1,"column_end":74}},{"value":"/ the 24 most significant random bits of a `u32` are used and for `f64` the","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":14942,"byte_end":15019,"line_start":205,"line_end":205,"column_start":1,"column_end":78}},{"value":"/ 53 most significant bits of a `u64` are used. The conversion uses the","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":15020,"byte_end":15093,"line_start":206,"line_end":206,"column_start":1,"column_end":74}},{"value":"/ multiplicative method: `(rng.gen::<$uty>() >> N) as $ty * (ε/2)`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":15094,"byte_end":15164,"line_start":207,"line_end":207,"column_start":1,"column_end":70}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":15165,"byte_end":15168,"line_start":208,"line_end":208,"column_start":1,"column_end":4}},{"value":"/ See also: [`Open01`] which samples from `(0, 1)`, [`OpenClosed01`] which","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":15169,"byte_end":15245,"line_start":209,"line_end":209,"column_start":1,"column_end":77}},{"value":"/ samples from `(0, 1]` and `Rng::gen_range(0..1)` which also samples from","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":15246,"byte_end":15322,"line_start":210,"line_end":210,"column_start":1,"column_end":77}},{"value":"/ `[0, 1)`. Note that `Open01` uses transmute-based methods which yield 1 bit","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":15323,"byte_end":15402,"line_start":211,"line_end":211,"column_start":1,"column_end":80}},{"value":"/ less precision but may perform faster on some architectures (on modern Intel","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":15403,"byte_end":15483,"line_start":212,"line_end":212,"column_start":1,"column_end":81}},{"value":"/ CPUs all methods have approximately equal performance).","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":15484,"byte_end":15543,"line_start":213,"line_end":213,"column_start":1,"column_end":60}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":15544,"byte_end":15547,"line_start":214,"line_end":214,"column_start":1,"column_end":4}},{"value":"/ [`Uniform`]: uniform::Uniform","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":15548,"byte_end":15581,"line_start":215,"line_end":215,"column_start":1,"column_end":34}}]},{"kind":"Mod","id":{"krate":0,"index":531},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/prelude.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1},"name":"prelude","qualname":"::prelude","value":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/prelude.rs","parent":null,"children":[{"krate":0,"index":532},{"krate":0,"index":535},{"krate":0,"index":538},{"krate":0,"index":541},{"krate":0,"index":542},{"krate":0,"index":545},{"krate":0,"index":548},{"krate":0,"index":549},{"krate":0,"index":552},{"krate":0,"index":555},{"krate":0,"index":556},{"krate":0,"index":559},{"krate":0,"index":562},{"krate":0,"index":565}],"decl_id":null,"docs":" Convenience re-export of common members","sig":null,"attributes":[{"value":"/ Convenience re-export of common members","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/prelude.rs","byte_start":163495,"byte_end":163538,"line_start":9,"line_end":9,"column_start":1,"column_end":44}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/prelude.rs","byte_start":163539,"byte_end":163542,"line_start":10,"line_end":10,"column_start":1,"column_end":4}},{"value":"/ Like the standard library's prelude, this module simplifies importing of","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/prelude.rs","byte_start":163543,"byte_end":163619,"line_start":11,"line_end":11,"column_start":1,"column_end":77}},{"value":"/ common items. Unlike the standard prelude, the contents of this module must","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/prelude.rs","byte_start":163620,"byte_end":163699,"line_start":12,"line_end":12,"column_start":1,"column_end":80}},{"value":"/ be imported manually:","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/prelude.rs","byte_start":163700,"byte_end":163725,"line_start":13,"line_end":13,"column_start":1,"column_end":26}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/prelude.rs","byte_start":163726,"byte_end":163729,"line_start":14,"line_end":14,"column_start":1,"column_end":4}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/prelude.rs","byte_start":163730,"byte_end":163737,"line_start":15,"line_end":15,"column_start":1,"column_end":8}},{"value":"/ use rand::prelude::*;","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/prelude.rs","byte_start":163738,"byte_end":163763,"line_start":16,"line_end":16,"column_start":1,"column_end":26}},{"value":"/ # let mut r = StdRng::from_rng(thread_rng()).unwrap();","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/prelude.rs","byte_start":163764,"byte_end":163822,"line_start":17,"line_end":17,"column_start":1,"column_end":59}},{"value":"/ # let _: f32 = r.gen();","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/prelude.rs","byte_start":163823,"byte_end":163850,"line_start":18,"line_end":18,"column_start":1,"column_end":28}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/prelude.rs","byte_start":163851,"byte_end":163858,"line_start":19,"line_end":19,"column_start":1,"column_end":8}}]},{"kind":"Trait","id":{"krate":0,"index":603},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":166588,"byte_end":166591,"line_start":55,"line_end":55,"column_start":11,"column_end":14},"name":"Rng","qualname":"::rng::Rng","value":"Rng: RngCore","parent":null,"children":[{"krate":0,"index":604},{"krate":0,"index":606},{"krate":0,"index":609},{"krate":0,"index":612},{"krate":0,"index":615},{"krate":0,"index":618},{"krate":0,"index":620},{"krate":0,"index":621}],"decl_id":null,"docs":" An automatically-implemented extension trait on [`RngCore`] providing high-level\n generic methods for sampling values and other convenience methods.","sig":null,"attributes":[{"value":"/ An automatically-implemented extension trait on [`RngCore`] providing high-level","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":165057,"byte_end":165141,"line_start":18,"line_end":18,"column_start":1,"column_end":85}},{"value":"/ generic methods for sampling values and other convenience methods.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":165142,"byte_end":165212,"line_start":19,"line_end":19,"column_start":1,"column_end":71}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":165213,"byte_end":165216,"line_start":20,"line_end":20,"column_start":1,"column_end":4}},{"value":"/ This is the primary trait to use when generating random values.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":165217,"byte_end":165284,"line_start":21,"line_end":21,"column_start":1,"column_end":68}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":165285,"byte_end":165288,"line_start":22,"line_end":22,"column_start":1,"column_end":4}},{"value":"/ # Generic usage","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":165289,"byte_end":165308,"line_start":23,"line_end":23,"column_start":1,"column_end":20}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":165309,"byte_end":165312,"line_start":24,"line_end":24,"column_start":1,"column_end":4}},{"value":"/ The basic pattern is `fn foo<R: Rng + ?Sized>(rng: &mut R)`. Some","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":165313,"byte_end":165382,"line_start":25,"line_end":25,"column_start":1,"column_end":70}},{"value":"/ things are worth noting here:","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":165383,"byte_end":165416,"line_start":26,"line_end":26,"column_start":1,"column_end":34}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":165417,"byte_end":165420,"line_start":27,"line_end":27,"column_start":1,"column_end":4}},{"value":"/ - Since `Rng: RngCore` and every `RngCore` implements `Rng`, it makes no","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":165421,"byte_end":165497,"line_start":28,"line_end":28,"column_start":1,"column_end":77}},{"value":"/ difference whether we use `R: Rng` or `R: RngCore`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":165498,"byte_end":165555,"line_start":29,"line_end":29,"column_start":1,"column_end":58}},{"value":"/ - The `+ ?Sized` un-bounding allows functions to be called directly on","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":165556,"byte_end":165630,"line_start":30,"line_end":30,"column_start":1,"column_end":75}},{"value":"/ type-erased references; i.e. `foo(r)` where `r: &mut dyn RngCore`. Without","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":165631,"byte_end":165711,"line_start":31,"line_end":31,"column_start":1,"column_end":81}},{"value":"/ this it would be necessary to write `foo(&mut r)`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":165712,"byte_end":165768,"line_start":32,"line_end":32,"column_start":1,"column_end":57}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":165769,"byte_end":165772,"line_start":33,"line_end":33,"column_start":1,"column_end":4}},{"value":"/ An alternative pattern is possible: `fn foo<R: Rng>(rng: R)`. This has some","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":165773,"byte_end":165852,"line_start":34,"line_end":34,"column_start":1,"column_end":80}},{"value":"/ trade-offs. It allows the argument to be consumed directly without a `&mut`","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":165853,"byte_end":165932,"line_start":35,"line_end":35,"column_start":1,"column_end":80}},{"value":"/ (which is how `from_rng(thread_rng())` works); also it still works directly","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":165933,"byte_end":166012,"line_start":36,"line_end":36,"column_start":1,"column_end":80}},{"value":"/ on references (including type-erased references). Unfortunately within the","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":166013,"byte_end":166091,"line_start":37,"line_end":37,"column_start":1,"column_end":79}},{"value":"/ function `foo` it is not known whether `rng` is a reference type or not,","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":166092,"byte_end":166168,"line_start":38,"line_end":38,"column_start":1,"column_end":77}},{"value":"/ hence many uses of `rng` require an extra reference, either explicitly","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":166169,"byte_end":166243,"line_start":39,"line_end":39,"column_start":1,"column_end":75}},{"value":"/ (`distr.sample(&mut rng)`) or implicitly (`rng.gen()`); one may hope the","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":166244,"byte_end":166320,"line_start":40,"line_end":40,"column_start":1,"column_end":77}},{"value":"/ optimiser can remove redundant references later.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":166321,"byte_end":166373,"line_start":41,"line_end":41,"column_start":1,"column_end":53}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":166374,"byte_end":166377,"line_start":42,"line_end":42,"column_start":1,"column_end":4}},{"value":"/ Example:","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":166378,"byte_end":166390,"line_start":43,"line_end":43,"column_start":1,"column_end":13}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":166391,"byte_end":166394,"line_start":44,"line_end":44,"column_start":1,"column_end":4}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":166395,"byte_end":166402,"line_start":45,"line_end":45,"column_start":1,"column_end":8}},{"value":"/ # use rand::thread_rng;","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":166403,"byte_end":166430,"line_start":46,"line_end":46,"column_start":1,"column_end":28}},{"value":"/ use rand::Rng;","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":166431,"byte_end":166449,"line_start":47,"line_end":47,"column_start":1,"column_end":19}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":166450,"byte_end":166453,"line_start":48,"line_end":48,"column_start":1,"column_end":4}},{"value":"/ fn foo<R: Rng + ?Sized>(rng: &mut R) -> f32 {","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":166454,"byte_end":166503,"line_start":49,"line_end":49,"column_start":1,"column_end":50}},{"value":"/ rng.gen()","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":166504,"byte_end":166521,"line_start":50,"line_end":50,"column_start":1,"column_end":18}},{"value":"/ }","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":166522,"byte_end":166527,"line_start":51,"line_end":51,"column_start":1,"column_end":6}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":166528,"byte_end":166531,"line_start":52,"line_end":52,"column_start":1,"column_end":4}},{"value":"/ # let v = foo(&mut thread_rng());","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":166532,"byte_end":166569,"line_start":53,"line_end":53,"column_start":1,"column_end":38}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":166570,"byte_end":166577,"line_start":54,"line_end":54,"column_start":1,"column_end":8}}]},{"kind":"Method","id":{"krate":0,"index":604},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":167864,"byte_end":167867,"line_start":93,"line_end":93,"column_start":8,"column_end":11},"name":"gen","qualname":"::rng::Rng::gen","value":"pub fn gen<T>(&mut Self) -> T where Standard: Distribution<T>","parent":{"krate":0,"index":603},"children":[],"decl_id":null,"docs":" Return a random value supporting the [`Standard`] distribution.","sig":null,"attributes":[{"value":"/ Return a random value supporting the [`Standard`] distribution.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":166607,"byte_end":166674,"line_start":56,"line_end":56,"column_start":5,"column_end":72}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":166679,"byte_end":166682,"line_start":57,"line_end":57,"column_start":5,"column_end":8}},{"value":"/ # Example","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":166687,"byte_end":166700,"line_start":58,"line_end":58,"column_start":5,"column_end":18}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":166705,"byte_end":166708,"line_start":59,"line_end":59,"column_start":5,"column_end":8}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":166713,"byte_end":166720,"line_start":60,"line_end":60,"column_start":5,"column_end":12}},{"value":"/ use rand::{thread_rng, Rng};","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":166725,"byte_end":166757,"line_start":61,"line_end":61,"column_start":5,"column_end":37}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":166762,"byte_end":166765,"line_start":62,"line_end":62,"column_start":5,"column_end":8}},{"value":"/ let mut rng = thread_rng();","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":166770,"byte_end":166801,"line_start":63,"line_end":63,"column_start":5,"column_end":36}},{"value":"/ let x: u32 = rng.gen();","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":166806,"byte_end":166833,"line_start":64,"line_end":64,"column_start":5,"column_end":32}},{"value":"/ println!(\"{}\", x);","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":166838,"byte_end":166860,"line_start":65,"line_end":65,"column_start":5,"column_end":27}},{"value":"/ println!(\"{:?}\", rng.gen::<(f64, bool)>());","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":166865,"byte_end":166912,"line_start":66,"line_end":66,"column_start":5,"column_end":52}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":166917,"byte_end":166924,"line_start":67,"line_end":67,"column_start":5,"column_end":12}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":166929,"byte_end":166932,"line_start":68,"line_end":68,"column_start":5,"column_end":8}},{"value":"/ # Arrays and tuples","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":166937,"byte_end":166960,"line_start":69,"line_end":69,"column_start":5,"column_end":28}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":166965,"byte_end":166968,"line_start":70,"line_end":70,"column_start":5,"column_end":8}},{"value":"/ The `rng.gen()` method is able to generate arrays (up to 32 elements)","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":166973,"byte_end":167046,"line_start":71,"line_end":71,"column_start":5,"column_end":78}},{"value":"/ and tuples (up to 12 elements), so long as all element types can be","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":167051,"byte_end":167122,"line_start":72,"line_end":72,"column_start":5,"column_end":76}},{"value":"/ generated.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":167127,"byte_end":167141,"line_start":73,"line_end":73,"column_start":5,"column_end":19}},{"value":"/ When using `rustc` ≥ 1.51, enable the `min_const_gen` feature to support","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":167146,"byte_end":167224,"line_start":74,"line_end":74,"column_start":5,"column_end":81}},{"value":"/ arrays larger than 32 elements.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":167229,"byte_end":167264,"line_start":75,"line_end":75,"column_start":5,"column_end":40}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":167269,"byte_end":167272,"line_start":76,"line_end":76,"column_start":5,"column_end":8}},{"value":"/ For arrays of integers, especially for those with small element types","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":167277,"byte_end":167350,"line_start":77,"line_end":77,"column_start":5,"column_end":78}},{"value":"/ (< 64 bit), it will likely be faster to instead use [`Rng::fill`].","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":167355,"byte_end":167425,"line_start":78,"line_end":78,"column_start":5,"column_end":75}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":167430,"byte_end":167433,"line_start":79,"line_end":79,"column_start":5,"column_end":8}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":167438,"byte_end":167445,"line_start":80,"line_end":80,"column_start":5,"column_end":12}},{"value":"/ use rand::{thread_rng, Rng};","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":167450,"byte_end":167482,"line_start":81,"line_end":81,"column_start":5,"column_end":37}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":167487,"byte_end":167490,"line_start":82,"line_end":82,"column_start":5,"column_end":8}},{"value":"/ let mut rng = thread_rng();","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":167495,"byte_end":167526,"line_start":83,"line_end":83,"column_start":5,"column_end":36}},{"value":"/ let tuple: (u8, i32, char) = rng.gen(); // arbitrary tuple support","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":167531,"byte_end":167601,"line_start":84,"line_end":84,"column_start":5,"column_end":75}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":167606,"byte_end":167609,"line_start":85,"line_end":85,"column_start":5,"column_end":8}},{"value":"/ let arr1: [f32; 32] = rng.gen(); // array construction","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":167614,"byte_end":167679,"line_start":86,"line_end":86,"column_start":5,"column_end":70}},{"value":"/ let mut arr2 = [0u8; 128];","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":167684,"byte_end":167714,"line_start":87,"line_end":87,"column_start":5,"column_end":35}},{"value":"/ rng.fill(&mut arr2); // array fill","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":167719,"byte_end":167776,"line_start":88,"line_end":88,"column_start":5,"column_end":62}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":167781,"byte_end":167788,"line_start":89,"line_end":89,"column_start":5,"column_end":12}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":167793,"byte_end":167796,"line_start":90,"line_end":90,"column_start":5,"column_end":8}},{"value":"/ [`Standard`]: distributions::Standard","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":167801,"byte_end":167842,"line_start":91,"line_end":91,"column_start":5,"column_end":46}},{"value":"inline","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":167847,"byte_end":167856,"line_start":92,"line_end":92,"column_start":5,"column_end":14}}]},{"kind":"Method","id":{"krate":0,"index":606},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":168902,"byte_end":168911,"line_start":129,"line_end":129,"column_start":8,"column_end":17},"name":"gen_range","qualname":"::rng::Rng::gen_range","value":"pub fn gen_range<T, R>(&mut Self, R) -> T where T: SampleUniform,\nR: SampleRange<T>","parent":{"krate":0,"index":603},"children":[],"decl_id":null,"docs":" Generate a random value in the given range.","sig":null,"attributes":[{"value":"/ Generate a random value in the given range.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":167966,"byte_end":168013,"line_start":98,"line_end":98,"column_start":5,"column_end":52}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":168018,"byte_end":168021,"line_start":99,"line_end":99,"column_start":5,"column_end":8}},{"value":"/ This function is optimised for the case that only a single sample is","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":168026,"byte_end":168098,"line_start":100,"line_end":100,"column_start":5,"column_end":77}},{"value":"/ made from the given range. See also the [`Uniform`] distribution","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":168103,"byte_end":168171,"line_start":101,"line_end":101,"column_start":5,"column_end":73}},{"value":"/ type which may be faster if sampling from the same range repeatedly.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":168176,"byte_end":168248,"line_start":102,"line_end":102,"column_start":5,"column_end":77}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":168253,"byte_end":168256,"line_start":103,"line_end":103,"column_start":5,"column_end":8}},{"value":"/ Only `gen_range(low..high)` and `gen_range(low..=high)` are supported.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":168261,"byte_end":168335,"line_start":104,"line_end":104,"column_start":5,"column_end":79}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":168340,"byte_end":168343,"line_start":105,"line_end":105,"column_start":5,"column_end":8}},{"value":"/ # Panics","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":168348,"byte_end":168360,"line_start":106,"line_end":106,"column_start":5,"column_end":17}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":168365,"byte_end":168368,"line_start":107,"line_end":107,"column_start":5,"column_end":8}},{"value":"/ Panics if the range is empty.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":168373,"byte_end":168406,"line_start":108,"line_end":108,"column_start":5,"column_end":38}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":168411,"byte_end":168414,"line_start":109,"line_end":109,"column_start":5,"column_end":8}},{"value":"/ # Example","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":168419,"byte_end":168432,"line_start":110,"line_end":110,"column_start":5,"column_end":18}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":168437,"byte_end":168440,"line_start":111,"line_end":111,"column_start":5,"column_end":8}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":168445,"byte_end":168452,"line_start":112,"line_end":112,"column_start":5,"column_end":12}},{"value":"/ use rand::{thread_rng, Rng};","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":168457,"byte_end":168489,"line_start":113,"line_end":113,"column_start":5,"column_end":37}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":168494,"byte_end":168497,"line_start":114,"line_end":114,"column_start":5,"column_end":8}},{"value":"/ let mut rng = thread_rng();","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":168502,"byte_end":168533,"line_start":115,"line_end":115,"column_start":5,"column_end":36}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":168538,"byte_end":168541,"line_start":116,"line_end":116,"column_start":5,"column_end":8}},{"value":"/ // Exclusive range","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":168546,"byte_end":168568,"line_start":117,"line_end":117,"column_start":5,"column_end":27}},{"value":"/ let n: u32 = rng.gen_range(0..10);","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":168573,"byte_end":168611,"line_start":118,"line_end":118,"column_start":5,"column_end":43}},{"value":"/ println!(\"{}\", n);","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":168616,"byte_end":168638,"line_start":119,"line_end":119,"column_start":5,"column_end":27}},{"value":"/ let m: f64 = rng.gen_range(-40.0..1.3e5);","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":168643,"byte_end":168688,"line_start":120,"line_end":120,"column_start":5,"column_end":50}},{"value":"/ println!(\"{}\", m);","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":168693,"byte_end":168715,"line_start":121,"line_end":121,"column_start":5,"column_end":27}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":168720,"byte_end":168723,"line_start":122,"line_end":122,"column_start":5,"column_end":8}},{"value":"/ // Inclusive range","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":168728,"byte_end":168750,"line_start":123,"line_end":123,"column_start":5,"column_end":27}},{"value":"/ let n: u32 = rng.gen_range(0..=10);","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":168755,"byte_end":168794,"line_start":124,"line_end":124,"column_start":5,"column_end":44}},{"value":"/ println!(\"{}\", n);","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":168799,"byte_end":168821,"line_start":125,"line_end":125,"column_start":5,"column_end":27}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":168826,"byte_end":168833,"line_start":126,"line_end":126,"column_start":5,"column_end":12}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":168838,"byte_end":168841,"line_start":127,"line_end":127,"column_start":5,"column_end":8}},{"value":"/ [`Uniform`]: distributions::uniform::Uniform","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":168846,"byte_end":168894,"line_start":128,"line_end":128,"column_start":5,"column_end":53}}]},{"kind":"Method","id":{"krate":0,"index":609},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":169598,"byte_end":169604,"line_start":152,"line_end":152,"column_start":8,"column_end":14},"name":"sample","qualname":"::rng::Rng::sample","value":"pub fn sample<T, D: Distribution<T>>(&mut Self, D) -> T","parent":{"krate":0,"index":603},"children":[],"decl_id":null,"docs":" Sample a new value, using the given distribution.","sig":null,"attributes":[{"value":"/ Sample a new value, using the given distribution.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":169122,"byte_end":169175,"line_start":138,"line_end":138,"column_start":5,"column_end":58}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":169180,"byte_end":169183,"line_start":139,"line_end":139,"column_start":5,"column_end":8}},{"value":"/ ### Example","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":169188,"byte_end":169203,"line_start":140,"line_end":140,"column_start":5,"column_end":20}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":169208,"byte_end":169211,"line_start":141,"line_end":141,"column_start":5,"column_end":8}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":169216,"byte_end":169223,"line_start":142,"line_end":142,"column_start":5,"column_end":12}},{"value":"/ use rand::{thread_rng, Rng};","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":169228,"byte_end":169260,"line_start":143,"line_end":143,"column_start":5,"column_end":37}},{"value":"/ use rand::distributions::Uniform;","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":169265,"byte_end":169302,"line_start":144,"line_end":144,"column_start":5,"column_end":42}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":169307,"byte_end":169310,"line_start":145,"line_end":145,"column_start":5,"column_end":8}},{"value":"/ let mut rng = thread_rng();","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":169315,"byte_end":169346,"line_start":146,"line_end":146,"column_start":5,"column_end":36}},{"value":"/ let x = rng.sample(Uniform::new(10u32, 15));","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":169351,"byte_end":169399,"line_start":147,"line_end":147,"column_start":5,"column_end":53}},{"value":"/ // Type annotation requires two types, the type and distribution; the","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":169404,"byte_end":169477,"line_start":148,"line_end":148,"column_start":5,"column_end":78}},{"value":"/ // distribution can be inferred.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":169482,"byte_end":169518,"line_start":149,"line_end":149,"column_start":5,"column_end":41}},{"value":"/ let y = rng.sample::<u16, _>(Uniform::new(10, 15));","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":169523,"byte_end":169578,"line_start":150,"line_end":150,"column_start":5,"column_end":60}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":169583,"byte_end":169590,"line_start":151,"line_end":151,"column_start":5,"column_end":12}}]},{"kind":"Method","id":{"krate":0,"index":612},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":171005,"byte_end":171016,"line_start":192,"line_end":192,"column_start":8,"column_end":19},"name":"sample_iter","qualname":"::rng::Rng::sample_iter","value":"pub fn sample_iter<T, D>(Self, D) -> distributions::DistIter<D, Self, T> where\nD: Distribution<T>, Self: Sized","parent":{"krate":0,"index":603},"children":[],"decl_id":null,"docs":" Create an iterator that generates values using the given distribution.","sig":null,"attributes":[{"value":"/ Create an iterator that generates values using the given distribution.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":169694,"byte_end":169768,"line_start":156,"line_end":156,"column_start":5,"column_end":79}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":169773,"byte_end":169776,"line_start":157,"line_end":157,"column_start":5,"column_end":8}},{"value":"/ Note that this function takes its arguments by value. This works since","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":169781,"byte_end":169855,"line_start":158,"line_end":158,"column_start":5,"column_end":79}},{"value":"/ `(&mut R): Rng where R: Rng` and","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":169860,"byte_end":169896,"line_start":159,"line_end":159,"column_start":5,"column_end":41}},{"value":"/ `(&D): Distribution where D: Distribution`,","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":169901,"byte_end":169948,"line_start":160,"line_end":160,"column_start":5,"column_end":52}},{"value":"/ however borrowing is not automatic hence `rng.sample_iter(...)` may","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":169953,"byte_end":170024,"line_start":161,"line_end":161,"column_start":5,"column_end":76}},{"value":"/ need to be replaced with `(&mut rng).sample_iter(...)`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":170029,"byte_end":170088,"line_start":162,"line_end":162,"column_start":5,"column_end":64}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":170093,"byte_end":170096,"line_start":163,"line_end":163,"column_start":5,"column_end":8}},{"value":"/ # Example","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":170101,"byte_end":170114,"line_start":164,"line_end":164,"column_start":5,"column_end":18}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":170119,"byte_end":170122,"line_start":165,"line_end":165,"column_start":5,"column_end":8}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":170127,"byte_end":170134,"line_start":166,"line_end":166,"column_start":5,"column_end":12}},{"value":"/ use rand::{thread_rng, Rng};","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":170139,"byte_end":170171,"line_start":167,"line_end":167,"column_start":5,"column_end":37}},{"value":"/ use rand::distributions::{Alphanumeric, Uniform, Standard};","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":170176,"byte_end":170239,"line_start":168,"line_end":168,"column_start":5,"column_end":68}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":170244,"byte_end":170247,"line_start":169,"line_end":169,"column_start":5,"column_end":8}},{"value":"/ let mut rng = thread_rng();","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":170252,"byte_end":170283,"line_start":170,"line_end":170,"column_start":5,"column_end":36}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":170288,"byte_end":170291,"line_start":171,"line_end":171,"column_start":5,"column_end":8}},{"value":"/ // Vec of 16 x f32:","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":170296,"byte_end":170319,"line_start":172,"line_end":172,"column_start":5,"column_end":28}},{"value":"/ let v: Vec<f32> = (&mut rng).sample_iter(Standard).take(16).collect();","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":170324,"byte_end":170398,"line_start":173,"line_end":173,"column_start":5,"column_end":79}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":170403,"byte_end":170406,"line_start":174,"line_end":174,"column_start":5,"column_end":8}},{"value":"/ // String:","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":170411,"byte_end":170425,"line_start":175,"line_end":175,"column_start":5,"column_end":19}},{"value":"/ let s: String = (&mut rng).sample_iter(Alphanumeric)","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":170430,"byte_end":170486,"line_start":176,"line_end":176,"column_start":5,"column_end":61}},{"value":"/ .take(7)","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":170491,"byte_end":170507,"line_start":177,"line_end":177,"column_start":5,"column_end":21}},{"value":"/ .map(char::from)","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":170512,"byte_end":170536,"line_start":178,"line_end":178,"column_start":5,"column_end":29}},{"value":"/ .collect();","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":170541,"byte_end":170560,"line_start":179,"line_end":179,"column_start":5,"column_end":24}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":170565,"byte_end":170568,"line_start":180,"line_end":180,"column_start":5,"column_end":8}},{"value":"/ // Combined values","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":170573,"byte_end":170595,"line_start":181,"line_end":181,"column_start":5,"column_end":27}},{"value":"/ println!(\"{:?}\", (&mut rng).sample_iter(Standard).take(5)","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":170600,"byte_end":170661,"line_start":182,"line_end":182,"column_start":5,"column_end":66}},{"value":"/ .collect::<Vec<(f64, bool)>>());","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":170666,"byte_end":170731,"line_start":183,"line_end":183,"column_start":5,"column_end":70}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":170736,"byte_end":170739,"line_start":184,"line_end":184,"column_start":5,"column_end":8}},{"value":"/ // Dice-rolling:","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":170744,"byte_end":170764,"line_start":185,"line_end":185,"column_start":5,"column_end":25}},{"value":"/ let die_range = Uniform::new_inclusive(1, 6);","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":170769,"byte_end":170818,"line_start":186,"line_end":186,"column_start":5,"column_end":54}},{"value":"/ let mut roll_die = (&mut rng).sample_iter(die_range);","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":170823,"byte_end":170880,"line_start":187,"line_end":187,"column_start":5,"column_end":62}},{"value":"/ while roll_die.next().unwrap() != 6 {","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":170885,"byte_end":170926,"line_start":188,"line_end":188,"column_start":5,"column_end":46}},{"value":"/ println!(\"Not a 6; rolling again!\");","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":170931,"byte_end":170975,"line_start":189,"line_end":189,"column_start":5,"column_end":49}},{"value":"/ }","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":170980,"byte_end":170985,"line_start":190,"line_end":190,"column_start":5,"column_end":10}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":170990,"byte_end":170997,"line_start":191,"line_end":191,"column_start":5,"column_end":12}}]},{"kind":"Method","id":{"krate":0,"index":615},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":171750,"byte_end":171754,"line_start":218,"line_end":218,"column_start":8,"column_end":12},"name":"fill","qualname":"::rng::Rng::fill","value":"pub fn fill<T: Fill + ?Sized>(&mut Self, &mut T)","parent":{"krate":0,"index":603},"children":[],"decl_id":null,"docs":" Fill any type implementing [`Fill`] with random data","sig":null,"attributes":[{"value":"/ Fill any type implementing [`Fill`] with random data","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":171186,"byte_end":171242,"line_start":200,"line_end":200,"column_start":5,"column_end":61}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":171247,"byte_end":171250,"line_start":201,"line_end":201,"column_start":5,"column_end":8}},{"value":"/ The distribution is expected to be uniform with portable results, but","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":171255,"byte_end":171328,"line_start":202,"line_end":202,"column_start":5,"column_end":78}},{"value":"/ this cannot be guaranteed for third-party implementations.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":171333,"byte_end":171395,"line_start":203,"line_end":203,"column_start":5,"column_end":67}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":171400,"byte_end":171403,"line_start":204,"line_end":204,"column_start":5,"column_end":8}},{"value":"/ This is identical to [`try_fill`] except that it panics on error.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":171408,"byte_end":171477,"line_start":205,"line_end":205,"column_start":5,"column_end":74}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":171482,"byte_end":171485,"line_start":206,"line_end":206,"column_start":5,"column_end":8}},{"value":"/ # Example","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":171490,"byte_end":171503,"line_start":207,"line_end":207,"column_start":5,"column_end":18}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":171508,"byte_end":171511,"line_start":208,"line_end":208,"column_start":5,"column_end":8}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":171516,"byte_end":171523,"line_start":209,"line_end":209,"column_start":5,"column_end":12}},{"value":"/ use rand::{thread_rng, Rng};","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":171528,"byte_end":171560,"line_start":210,"line_end":210,"column_start":5,"column_end":37}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":171565,"byte_end":171568,"line_start":211,"line_end":211,"column_start":5,"column_end":8}},{"value":"/ let mut arr = [0i8; 20];","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":171573,"byte_end":171601,"line_start":212,"line_end":212,"column_start":5,"column_end":33}},{"value":"/ thread_rng().fill(&mut arr[..]);","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":171606,"byte_end":171642,"line_start":213,"line_end":213,"column_start":5,"column_end":41}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":171647,"byte_end":171654,"line_start":214,"line_end":214,"column_start":5,"column_end":12}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":171659,"byte_end":171662,"line_start":215,"line_end":215,"column_start":5,"column_end":8}},{"value":"/ [`fill_bytes`]: RngCore::fill_bytes","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":171667,"byte_end":171706,"line_start":216,"line_end":216,"column_start":5,"column_end":44}},{"value":"/ [`try_fill`]: Rng::try_fill","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":171711,"byte_end":171742,"line_start":217,"line_end":217,"column_start":5,"column_end":36}}]},{"kind":"Method","id":{"krate":0,"index":618},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":172594,"byte_end":172602,"line_start":246,"line_end":246,"column_start":8,"column_end":16},"name":"try_fill","qualname":"::rng::Rng::try_fill","value":"pub fn try_fill<T: Fill + ?Sized>(&mut Self, &mut T) -> Result<(), Error>","parent":{"krate":0,"index":603},"children":[],"decl_id":null,"docs":" Fill any type implementing [`Fill`] with random data","sig":null,"attributes":[{"value":"/ Fill any type implementing [`Fill`] with random data","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":171886,"byte_end":171942,"line_start":222,"line_end":222,"column_start":5,"column_end":61}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":171947,"byte_end":171950,"line_start":223,"line_end":223,"column_start":5,"column_end":8}},{"value":"/ The distribution is expected to be uniform with portable results, but","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":171955,"byte_end":172028,"line_start":224,"line_end":224,"column_start":5,"column_end":78}},{"value":"/ this cannot be guaranteed for third-party implementations.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":172033,"byte_end":172095,"line_start":225,"line_end":225,"column_start":5,"column_end":67}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":172100,"byte_end":172103,"line_start":226,"line_end":226,"column_start":5,"column_end":8}},{"value":"/ This is identical to [`fill`] except that it forwards errors.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":172108,"byte_end":172173,"line_start":227,"line_end":227,"column_start":5,"column_end":70}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":172178,"byte_end":172181,"line_start":228,"line_end":228,"column_start":5,"column_end":8}},{"value":"/ # Example","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":172186,"byte_end":172199,"line_start":229,"line_end":229,"column_start":5,"column_end":18}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":172204,"byte_end":172207,"line_start":230,"line_end":230,"column_start":5,"column_end":8}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":172212,"byte_end":172219,"line_start":231,"line_end":231,"column_start":5,"column_end":12}},{"value":"/ # use rand::Error;","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":172224,"byte_end":172246,"line_start":232,"line_end":232,"column_start":5,"column_end":27}},{"value":"/ use rand::{thread_rng, Rng};","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":172251,"byte_end":172283,"line_start":233,"line_end":233,"column_start":5,"column_end":37}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":172288,"byte_end":172291,"line_start":234,"line_end":234,"column_start":5,"column_end":8}},{"value":"/ # fn try_inner() -> Result<(), Error> {","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":172296,"byte_end":172339,"line_start":235,"line_end":235,"column_start":5,"column_end":48}},{"value":"/ let mut arr = [0u64; 4];","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":172344,"byte_end":172372,"line_start":236,"line_end":236,"column_start":5,"column_end":33}},{"value":"/ thread_rng().try_fill(&mut arr[..])?;","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":172377,"byte_end":172418,"line_start":237,"line_end":237,"column_start":5,"column_end":46}},{"value":"/ # Ok(())","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":172423,"byte_end":172435,"line_start":238,"line_end":238,"column_start":5,"column_end":17}},{"value":"/ # }","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":172440,"byte_end":172447,"line_start":239,"line_end":239,"column_start":5,"column_end":12}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":172452,"byte_end":172455,"line_start":240,"line_end":240,"column_start":5,"column_end":8}},{"value":"/ # try_inner().unwrap()","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":172460,"byte_end":172486,"line_start":241,"line_end":241,"column_start":5,"column_end":31}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":172491,"byte_end":172498,"line_start":242,"line_end":242,"column_start":5,"column_end":12}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":172503,"byte_end":172506,"line_start":243,"line_end":243,"column_start":5,"column_end":8}},{"value":"/ [`try_fill_bytes`]: RngCore::try_fill_bytes","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":172511,"byte_end":172558,"line_start":244,"line_end":244,"column_start":5,"column_end":52}},{"value":"/ [`fill`]: Rng::fill","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":172563,"byte_end":172586,"line_start":245,"line_end":245,"column_start":5,"column_end":28}}]},{"kind":"Method","id":{"krate":0,"index":620},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":173228,"byte_end":173236,"line_start":270,"line_end":270,"column_start":8,"column_end":16},"name":"gen_bool","qualname":"::rng::Rng::gen_bool","value":"pub fn gen_bool(&mut Self, f64) -> bool","parent":{"krate":0,"index":603},"children":[],"decl_id":null,"docs":" Return a bool with a probability `p` of being true.","sig":null,"attributes":[{"value":"/ Return a bool with a probability `p` of being true.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":172708,"byte_end":172763,"line_start":250,"line_end":250,"column_start":5,"column_end":60}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":172768,"byte_end":172771,"line_start":251,"line_end":251,"column_start":5,"column_end":8}},{"value":"/ See also the [`Bernoulli`] distribution, which may be faster if","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":172776,"byte_end":172843,"line_start":252,"line_end":252,"column_start":5,"column_end":72}},{"value":"/ sampling from the same probability repeatedly.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":172848,"byte_end":172898,"line_start":253,"line_end":253,"column_start":5,"column_end":55}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":172903,"byte_end":172906,"line_start":254,"line_end":254,"column_start":5,"column_end":8}},{"value":"/ # Example","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":172911,"byte_end":172924,"line_start":255,"line_end":255,"column_start":5,"column_end":18}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":172929,"byte_end":172932,"line_start":256,"line_end":256,"column_start":5,"column_end":8}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":172937,"byte_end":172944,"line_start":257,"line_end":257,"column_start":5,"column_end":12}},{"value":"/ use rand::{thread_rng, Rng};","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":172949,"byte_end":172981,"line_start":258,"line_end":258,"column_start":5,"column_end":37}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":172986,"byte_end":172989,"line_start":259,"line_end":259,"column_start":5,"column_end":8}},{"value":"/ let mut rng = thread_rng();","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":172994,"byte_end":173025,"line_start":260,"line_end":260,"column_start":5,"column_end":36}},{"value":"/ println!(\"{}\", rng.gen_bool(1.0 / 3.0));","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":173030,"byte_end":173074,"line_start":261,"line_end":261,"column_start":5,"column_end":49}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":173079,"byte_end":173086,"line_start":262,"line_end":262,"column_start":5,"column_end":12}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":173091,"byte_end":173094,"line_start":263,"line_end":263,"column_start":5,"column_end":8}},{"value":"/ # Panics","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":173099,"byte_end":173111,"line_start":264,"line_end":264,"column_start":5,"column_end":17}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":173116,"byte_end":173119,"line_start":265,"line_end":265,"column_start":5,"column_end":8}},{"value":"/ If `p < 0` or `p > 1`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":173124,"byte_end":173150,"line_start":266,"line_end":266,"column_start":5,"column_end":31}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":173155,"byte_end":173158,"line_start":267,"line_end":267,"column_start":5,"column_end":8}},{"value":"/ [`Bernoulli`]: distributions::Bernoulli","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":173163,"byte_end":173206,"line_start":268,"line_end":268,"column_start":5,"column_end":48}},{"value":"inline","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":173211,"byte_end":173220,"line_start":269,"line_end":269,"column_start":5,"column_end":14}}]},{"kind":"Method","id":{"krate":0,"index":621},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":174212,"byte_end":174221,"line_start":299,"line_end":299,"column_start":8,"column_end":17},"name":"gen_ratio","qualname":"::rng::Rng::gen_ratio","value":"pub fn gen_ratio(&mut Self, u32, u32) -> bool","parent":{"krate":0,"index":603},"children":[],"decl_id":null,"docs":" Return a bool with a probability of `numerator/denominator` of being\n true. I.e. `gen_ratio(2, 3)` has chance of 2 in 3, or about 67%, of\n returning true. If `numerator == denominator`, then the returned value\n is guaranteed to be `true`. If `numerator == 0`, then the returned\n value is guaranteed to be `false`.","sig":null,"attributes":[{"value":"/ Return a bool with a probability of `numerator/denominator` of being","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":173359,"byte_end":173431,"line_start":275,"line_end":275,"column_start":5,"column_end":77}},{"value":"/ true. I.e. `gen_ratio(2, 3)` has chance of 2 in 3, or about 67%, of","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":173436,"byte_end":173507,"line_start":276,"line_end":276,"column_start":5,"column_end":76}},{"value":"/ returning true. If `numerator == denominator`, then the returned value","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":173512,"byte_end":173586,"line_start":277,"line_end":277,"column_start":5,"column_end":79}},{"value":"/ is guaranteed to be `true`. If `numerator == 0`, then the returned","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":173591,"byte_end":173661,"line_start":278,"line_end":278,"column_start":5,"column_end":75}},{"value":"/ value is guaranteed to be `false`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":173666,"byte_end":173704,"line_start":279,"line_end":279,"column_start":5,"column_end":43}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":173709,"byte_end":173712,"line_start":280,"line_end":280,"column_start":5,"column_end":8}},{"value":"/ See also the [`Bernoulli`] distribution, which may be faster if","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":173717,"byte_end":173784,"line_start":281,"line_end":281,"column_start":5,"column_end":72}},{"value":"/ sampling from the same `numerator` and `denominator` repeatedly.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":173789,"byte_end":173857,"line_start":282,"line_end":282,"column_start":5,"column_end":73}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":173862,"byte_end":173865,"line_start":283,"line_end":283,"column_start":5,"column_end":8}},{"value":"/ # Panics","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":173870,"byte_end":173882,"line_start":284,"line_end":284,"column_start":5,"column_end":17}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":173887,"byte_end":173890,"line_start":285,"line_end":285,"column_start":5,"column_end":8}},{"value":"/ If `denominator == 0` or `numerator > denominator`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":173895,"byte_end":173950,"line_start":286,"line_end":286,"column_start":5,"column_end":60}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":173955,"byte_end":173958,"line_start":287,"line_end":287,"column_start":5,"column_end":8}},{"value":"/ # Example","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":173963,"byte_end":173976,"line_start":288,"line_end":288,"column_start":5,"column_end":18}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":173981,"byte_end":173984,"line_start":289,"line_end":289,"column_start":5,"column_end":8}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":173989,"byte_end":173996,"line_start":290,"line_end":290,"column_start":5,"column_end":12}},{"value":"/ use rand::{thread_rng, Rng};","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":174001,"byte_end":174033,"line_start":291,"line_end":291,"column_start":5,"column_end":37}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":174038,"byte_end":174041,"line_start":292,"line_end":292,"column_start":5,"column_end":8}},{"value":"/ let mut rng = thread_rng();","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":174046,"byte_end":174077,"line_start":293,"line_end":293,"column_start":5,"column_end":36}},{"value":"/ println!(\"{}\", rng.gen_ratio(2, 3));","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":174082,"byte_end":174122,"line_start":294,"line_end":294,"column_start":5,"column_end":45}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":174127,"byte_end":174134,"line_start":295,"line_end":295,"column_start":5,"column_end":12}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":174139,"byte_end":174142,"line_start":296,"line_end":296,"column_start":5,"column_end":8}},{"value":"/ [`Bernoulli`]: distributions::Bernoulli","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":174147,"byte_end":174190,"line_start":297,"line_end":297,"column_start":5,"column_end":48}},{"value":"inline","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":174195,"byte_end":174204,"line_start":298,"line_end":298,"column_start":5,"column_end":14}}]},{"kind":"Trait","id":{"krate":0,"index":624},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":174770,"byte_end":174774,"line_start":314,"line_end":314,"column_start":11,"column_end":15},"name":"Fill","qualname":"::rng::Fill","value":"Fill","parent":null,"children":[{"krate":0,"index":625}],"decl_id":null,"docs":" Types which may be filled with random data","sig":null,"attributes":[{"value":"/ Types which may be filled with random data","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":174436,"byte_end":174482,"line_start":307,"line_end":307,"column_start":1,"column_end":47}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":174483,"byte_end":174486,"line_start":308,"line_end":308,"column_start":1,"column_end":4}},{"value":"/ This trait allows arrays to be efficiently filled with random data.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":174487,"byte_end":174558,"line_start":309,"line_end":309,"column_start":1,"column_end":72}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":174559,"byte_end":174562,"line_start":310,"line_end":310,"column_start":1,"column_end":4}},{"value":"/ Implementations are expected to be portable across machines unless","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":174563,"byte_end":174633,"line_start":311,"line_end":311,"column_start":1,"column_end":71}},{"value":"/ clearly documented otherwise (see the","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":174634,"byte_end":174675,"line_start":312,"line_end":312,"column_start":1,"column_end":42}},{"value":"/ [Chapter on Portability](https://rust-random.github.io/book/portability.html)).","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":174676,"byte_end":174759,"line_start":313,"line_end":313,"column_start":1,"column_end":84}}]},{"kind":"Method","id":{"krate":0,"index":625},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":174819,"byte_end":174827,"line_start":316,"line_end":316,"column_start":8,"column_end":16},"name":"try_fill","qualname":"::rng::Fill::try_fill","value":"pub fn try_fill<R: Rng + ?Sized>(&mut Self, &mut R) -> Result<(), Error>","parent":{"krate":0,"index":624},"children":[],"decl_id":null,"docs":" Fill self with random data\n","sig":null,"attributes":[{"value":"/ Fill self with random data","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":174781,"byte_end":174811,"line_start":315,"line_end":315,"column_start":5,"column_end":35}}]},{"kind":"Mod","id":{"krate":0,"index":633},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1},"name":"rngs","qualname":"::rngs","value":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","parent":null,"children":[{"krate":0,"index":634},{"krate":0,"index":761},{"krate":0,"index":779},{"krate":0,"index":810},{"krate":0,"index":853},{"krate":0,"index":856},{"krate":0,"index":859},{"krate":0,"index":860}],"decl_id":null,"docs":" Random number generators and adapters","sig":null,"attributes":[{"value":"/ Random number generators and adapters","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":183735,"byte_end":183776,"line_start":9,"line_end":9,"column_start":1,"column_end":42}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":183777,"byte_end":183780,"line_start":10,"line_end":10,"column_start":1,"column_end":4}},{"value":"/ ## Background: Random number generators (RNGs)","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":183781,"byte_end":183831,"line_start":11,"line_end":11,"column_start":1,"column_end":51}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":183832,"byte_end":183835,"line_start":12,"line_end":12,"column_start":1,"column_end":4}},{"value":"/ Computers cannot produce random numbers from nowhere. We classify","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":183836,"byte_end":183905,"line_start":13,"line_end":13,"column_start":1,"column_end":70}},{"value":"/ random number generators as follows:","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":183906,"byte_end":183946,"line_start":14,"line_end":14,"column_start":1,"column_end":41}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":183947,"byte_end":183950,"line_start":15,"line_end":15,"column_start":1,"column_end":4}},{"value":"/ - \"True\" random number generators (TRNGs) use hard-to-predict data sources","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":183951,"byte_end":184031,"line_start":16,"line_end":16,"column_start":1,"column_end":81}},{"value":"/ (e.g. the high-resolution parts of event timings and sensor jitter) to","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":184032,"byte_end":184110,"line_start":17,"line_end":17,"column_start":1,"column_end":79}},{"value":"/ harvest random bit-sequences, apply algorithms to remove bias and","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":184111,"byte_end":184184,"line_start":18,"line_end":18,"column_start":1,"column_end":74}},{"value":"/ estimate available entropy, then combine these bits into a byte-sequence","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":184185,"byte_end":184265,"line_start":19,"line_end":19,"column_start":1,"column_end":81}},{"value":"/ or an entropy pool. This job is usually done by the operating system or","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":184266,"byte_end":184345,"line_start":20,"line_end":20,"column_start":1,"column_end":80}},{"value":"/ a hardware generator (HRNG).","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":184346,"byte_end":184382,"line_start":21,"line_end":21,"column_start":1,"column_end":37}},{"value":"/ - \"Pseudo\"-random number generators (PRNGs) use algorithms to transform a","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":184383,"byte_end":184462,"line_start":22,"line_end":22,"column_start":1,"column_end":80}},{"value":"/ seed into a sequence of pseudo-random numbers. These generators can be","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":184463,"byte_end":184541,"line_start":23,"line_end":23,"column_start":1,"column_end":79}},{"value":"/ fast and produce well-distributed unpredictable random numbers (or not).","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":184542,"byte_end":184622,"line_start":24,"line_end":24,"column_start":1,"column_end":81}},{"value":"/ They are usually deterministic: given algorithm and seed, the output","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":184623,"byte_end":184699,"line_start":25,"line_end":25,"column_start":1,"column_end":77}},{"value":"/ sequence can be reproduced. They have finite period and eventually loop;","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":184700,"byte_end":184780,"line_start":26,"line_end":26,"column_start":1,"column_end":81}},{"value":"/ with many algorithms this period is fixed and can be proven sufficiently","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":184781,"byte_end":184861,"line_start":27,"line_end":27,"column_start":1,"column_end":81}},{"value":"/ long, while others are chaotic and the period depends on the seed.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":184862,"byte_end":184936,"line_start":28,"line_end":28,"column_start":1,"column_end":75}},{"value":"/ - \"Cryptographically secure\" pseudo-random number generators (CSPRNGs)","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":184937,"byte_end":185013,"line_start":29,"line_end":29,"column_start":1,"column_end":77}},{"value":"/ are the sub-set of PRNGs which are secure. Security of the generator","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":185014,"byte_end":185090,"line_start":30,"line_end":30,"column_start":1,"column_end":77}},{"value":"/ relies both on hiding the internal state and using a strong algorithm.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":185091,"byte_end":185169,"line_start":31,"line_end":31,"column_start":1,"column_end":79}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":185170,"byte_end":185173,"line_start":32,"line_end":32,"column_start":1,"column_end":4}},{"value":"/ ## Traits and functionality","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":185174,"byte_end":185205,"line_start":33,"line_end":33,"column_start":1,"column_end":32}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":185206,"byte_end":185209,"line_start":34,"line_end":34,"column_start":1,"column_end":4}},{"value":"/ All RNGs implement the [`RngCore`] trait, as a consequence of which the","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":185210,"byte_end":185285,"line_start":35,"line_end":35,"column_start":1,"column_end":76}},{"value":"/ [`Rng`] extension trait is automatically implemented. Secure RNGs may","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":185286,"byte_end":185359,"line_start":36,"line_end":36,"column_start":1,"column_end":74}},{"value":"/ additionally implement the [`CryptoRng`] trait.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":185360,"byte_end":185411,"line_start":37,"line_end":37,"column_start":1,"column_end":52}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":185412,"byte_end":185415,"line_start":38,"line_end":38,"column_start":1,"column_end":4}},{"value":"/ All PRNGs require a seed to produce their random number sequence. The","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":185416,"byte_end":185489,"line_start":39,"line_end":39,"column_start":1,"column_end":74}},{"value":"/ [`SeedableRng`] trait provides three ways of constructing PRNGs:","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":185490,"byte_end":185558,"line_start":40,"line_end":40,"column_start":1,"column_end":69}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":185559,"byte_end":185562,"line_start":41,"line_end":41,"column_start":1,"column_end":4}},{"value":"/ - `from_seed` accepts a type specific to the PRNG","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":185563,"byte_end":185618,"line_start":42,"line_end":42,"column_start":1,"column_end":56}},{"value":"/ - `from_rng` allows a PRNG to be seeded from any other RNG","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":185619,"byte_end":185683,"line_start":43,"line_end":43,"column_start":1,"column_end":65}},{"value":"/ - `seed_from_u64` allows any PRNG to be seeded from a `u64` insecurely","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":185684,"byte_end":185760,"line_start":44,"line_end":44,"column_start":1,"column_end":77}},{"value":"/ - `from_entropy` securely seeds a PRNG from fresh entropy","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":185761,"byte_end":185824,"line_start":45,"line_end":45,"column_start":1,"column_end":64}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":185825,"byte_end":185828,"line_start":46,"line_end":46,"column_start":1,"column_end":4}},{"value":"/ Use the [`rand_core`] crate when implementing your own RNGs.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":185829,"byte_end":185893,"line_start":47,"line_end":47,"column_start":1,"column_end":65}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":185894,"byte_end":185897,"line_start":48,"line_end":48,"column_start":1,"column_end":4}},{"value":"/ ## Our generators","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":185898,"byte_end":185919,"line_start":49,"line_end":49,"column_start":1,"column_end":22}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":185920,"byte_end":185923,"line_start":50,"line_end":50,"column_start":1,"column_end":4}},{"value":"/ This crate provides several random number generators:","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":185924,"byte_end":185981,"line_start":51,"line_end":51,"column_start":1,"column_end":58}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":185982,"byte_end":185985,"line_start":52,"line_end":52,"column_start":1,"column_end":4}},{"value":"/ - [`OsRng`] is an interface to the operating system's random number","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":185986,"byte_end":186059,"line_start":53,"line_end":53,"column_start":1,"column_end":74}},{"value":"/ source. Typically the operating system uses a CSPRNG with entropy","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":186060,"byte_end":186133,"line_start":54,"line_end":54,"column_start":1,"column_end":74}},{"value":"/ provided by a TRNG and some type of on-going re-seeding.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":186134,"byte_end":186198,"line_start":55,"line_end":55,"column_start":1,"column_end":65}},{"value":"/ - [`ThreadRng`], provided by the [`thread_rng`] function, is a handle to a","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":186199,"byte_end":186279,"line_start":56,"line_end":56,"column_start":1,"column_end":81}},{"value":"/ thread-local CSPRNG with periodic seeding from [`OsRng`]. Because this","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":186280,"byte_end":186358,"line_start":57,"line_end":57,"column_start":1,"column_end":79}},{"value":"/ is local, it is typically much faster than [`OsRng`]. It should be","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":186359,"byte_end":186433,"line_start":58,"line_end":58,"column_start":1,"column_end":75}},{"value":"/ secure, though the paranoid may prefer [`OsRng`].","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":186434,"byte_end":186491,"line_start":59,"line_end":59,"column_start":1,"column_end":58}},{"value":"/ - [`StdRng`] is a CSPRNG chosen for good performance and trust of security","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":186492,"byte_end":186572,"line_start":60,"line_end":60,"column_start":1,"column_end":81}},{"value":"/ (based on reviews, maturity and usage). The current algorithm is ChaCha12,","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":186573,"byte_end":186655,"line_start":61,"line_end":61,"column_start":1,"column_end":83}},{"value":"/ which is well established and rigorously analysed.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":186656,"byte_end":186714,"line_start":62,"line_end":62,"column_start":1,"column_end":59}},{"value":"/ [`StdRng`] provides the algorithm used by [`ThreadRng`] but without","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":186715,"byte_end":186790,"line_start":63,"line_end":63,"column_start":1,"column_end":76}},{"value":"/ periodic reseeding.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":186791,"byte_end":186818,"line_start":64,"line_end":64,"column_start":1,"column_end":28}},{"value":"/ - [`SmallRng`] is an **insecure** PRNG designed to be fast, simple, require","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":186819,"byte_end":186900,"line_start":65,"line_end":65,"column_start":1,"column_end":82}},{"value":"/ little memory, and have good output quality.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":186901,"byte_end":186953,"line_start":66,"line_end":66,"column_start":1,"column_end":53}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":186954,"byte_end":186957,"line_start":67,"line_end":67,"column_start":1,"column_end":4}},{"value":"/ The algorithms selected for [`StdRng`] and [`SmallRng`] may change in any","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":186958,"byte_end":187035,"line_start":68,"line_end":68,"column_start":1,"column_end":78}},{"value":"/ release and may be platform-dependent, therefore they should be considered","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":187036,"byte_end":187114,"line_start":69,"line_end":69,"column_start":1,"column_end":79}},{"value":"/ **not reproducible**.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":187115,"byte_end":187140,"line_start":70,"line_end":70,"column_start":1,"column_end":26}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":187141,"byte_end":187144,"line_start":71,"line_end":71,"column_start":1,"column_end":4}},{"value":"/ ## Additional generators","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":187145,"byte_end":187173,"line_start":72,"line_end":72,"column_start":1,"column_end":29}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":187174,"byte_end":187177,"line_start":73,"line_end":73,"column_start":1,"column_end":4}},{"value":"/ **TRNGs**: The [`rdrand`] crate provides an interface to the RDRAND and","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":187178,"byte_end":187253,"line_start":74,"line_end":74,"column_start":1,"column_end":76}},{"value":"/ RDSEED instructions available in modern Intel and AMD CPUs.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":187254,"byte_end":187317,"line_start":75,"line_end":75,"column_start":1,"column_end":64}},{"value":"/ The [`rand_jitter`] crate provides a user-space implementation of","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":187318,"byte_end":187387,"line_start":76,"line_end":76,"column_start":1,"column_end":70}},{"value":"/ entropy harvesting from CPU timer jitter, but is very slow and has","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":187388,"byte_end":187458,"line_start":77,"line_end":77,"column_start":1,"column_end":71}},{"value":"/ [security issues](https://github.com/rust-random/rand/issues/699).","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":187459,"byte_end":187529,"line_start":78,"line_end":78,"column_start":1,"column_end":71}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":187530,"byte_end":187533,"line_start":79,"line_end":79,"column_start":1,"column_end":4}},{"value":"/ **PRNGs**: Several companion crates are available, providing individual or","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":187534,"byte_end":187612,"line_start":80,"line_end":80,"column_start":1,"column_end":79}},{"value":"/ families of PRNG algorithms. These provide the implementations behind","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":187613,"byte_end":187686,"line_start":81,"line_end":81,"column_start":1,"column_end":74}},{"value":"/ [`StdRng`] and [`SmallRng`] but can also be used directly, indeed *should*","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":187687,"byte_end":187765,"line_start":82,"line_end":82,"column_start":1,"column_end":79}},{"value":"/ be used directly when **reproducibility** matters.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":187766,"byte_end":187820,"line_start":83,"line_end":83,"column_start":1,"column_end":55}},{"value":"/ Some suggestions are: [`rand_chacha`], [`rand_pcg`], [`rand_xoshiro`].","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":187821,"byte_end":187895,"line_start":84,"line_end":84,"column_start":1,"column_end":75}},{"value":"/ A full list can be found by searching for crates with the [`rng` tag].","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":187896,"byte_end":187970,"line_start":85,"line_end":85,"column_start":1,"column_end":75}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":187971,"byte_end":187974,"line_start":86,"line_end":86,"column_start":1,"column_end":4}},{"value":"/ [`Rng`]: crate::Rng","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":187975,"byte_end":187998,"line_start":87,"line_end":87,"column_start":1,"column_end":24}},{"value":"/ [`RngCore`]: crate::RngCore","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":187999,"byte_end":188030,"line_start":88,"line_end":88,"column_start":1,"column_end":32}},{"value":"/ [`CryptoRng`]: crate::CryptoRng","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":188031,"byte_end":188066,"line_start":89,"line_end":89,"column_start":1,"column_end":36}},{"value":"/ [`SeedableRng`]: crate::SeedableRng","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":188067,"byte_end":188106,"line_start":90,"line_end":90,"column_start":1,"column_end":40}},{"value":"/ [`thread_rng`]: crate::thread_rng","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":188107,"byte_end":188144,"line_start":91,"line_end":91,"column_start":1,"column_end":38}},{"value":"/ [`rdrand`]: https://crates.io/crates/rdrand","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":188145,"byte_end":188192,"line_start":92,"line_end":92,"column_start":1,"column_end":48}},{"value":"/ [`rand_jitter`]: https://crates.io/crates/rand_jitter","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":188193,"byte_end":188250,"line_start":93,"line_end":93,"column_start":1,"column_end":58}},{"value":"/ [`rand_chacha`]: https://crates.io/crates/rand_chacha","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":188251,"byte_end":188308,"line_start":94,"line_end":94,"column_start":1,"column_end":58}},{"value":"/ [`rand_pcg`]: https://crates.io/crates/rand_pcg","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":188309,"byte_end":188360,"line_start":95,"line_end":95,"column_start":1,"column_end":52}},{"value":"/ [`rand_xoshiro`]: https://crates.io/crates/rand_xoshiro","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":188361,"byte_end":188420,"line_start":96,"line_end":96,"column_start":1,"column_end":60}},{"value":"/ [`rng` tag]: https://crates.io/keywords/rng","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":188421,"byte_end":188468,"line_start":97,"line_end":97,"column_start":1,"column_end":48}}]},{"kind":"Mod","id":{"krate":0,"index":634},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/mod.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1},"name":"adapter","qualname":"::rngs::adapter","value":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/mod.rs","parent":null,"children":[{"krate":0,"index":635},{"krate":0,"index":667},{"krate":0,"index":751},{"krate":0,"index":752},{"krate":0,"index":755},{"krate":0,"index":758}],"decl_id":null,"docs":" Wrappers / adapters forming RNGs\n","sig":null,"attributes":[{"value":"cfg(feature = \"std\")","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":188518,"byte_end":188541,"line_start":100,"line_end":100,"column_start":1,"column_end":24}},{"value":"/ Wrappers / adapters forming RNGs","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/mod.rs","byte_start":189697,"byte_end":189733,"line_start":9,"line_end":9,"column_start":1,"column_end":37}}]},{"kind":"Struct","id":{"krate":0,"index":2345},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/read.rs","byte_start":191209,"byte_end":191216,"line_start":39,"line_end":39,"column_start":12,"column_end":19},"name":"ReadRng","qualname":"::rngs::adapter::read::ReadRng","value":"ReadRng { }","parent":null,"children":[{"krate":0,"index":2347}],"decl_id":null,"docs":" An RNG that reads random bytes straight from any type supporting\n [`std::io::Read`], for example files.","sig":null,"attributes":[{"value":"/ An RNG that reads random bytes straight from any type supporting","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/read.rs","byte_start":190420,"byte_end":190488,"line_start":20,"line_end":20,"column_start":1,"column_end":69}},{"value":"/ [`std::io::Read`], for example files.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/read.rs","byte_start":190489,"byte_end":190530,"line_start":21,"line_end":21,"column_start":1,"column_end":42}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/read.rs","byte_start":190531,"byte_end":190534,"line_start":22,"line_end":22,"column_start":1,"column_end":4}},{"value":"/ This will work best with an infinite reader, but that is not required.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/read.rs","byte_start":190535,"byte_end":190609,"line_start":23,"line_end":23,"column_start":1,"column_end":75}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/read.rs","byte_start":190610,"byte_end":190613,"line_start":24,"line_end":24,"column_start":1,"column_end":4}},{"value":"/ This can be used with `/dev/urandom` on Unix but it is recommended to use","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/read.rs","byte_start":190614,"byte_end":190691,"line_start":25,"line_end":25,"column_start":1,"column_end":78}},{"value":"/ [`OsRng`] instead.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/read.rs","byte_start":190692,"byte_end":190714,"line_start":26,"line_end":26,"column_start":1,"column_end":23}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/read.rs","byte_start":190715,"byte_end":190718,"line_start":27,"line_end":27,"column_start":1,"column_end":4}},{"value":"/ # Panics","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/read.rs","byte_start":190719,"byte_end":190731,"line_start":28,"line_end":28,"column_start":1,"column_end":13}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/read.rs","byte_start":190732,"byte_end":190735,"line_start":29,"line_end":29,"column_start":1,"column_end":4}},{"value":"/ `ReadRng` uses [`std::io::Read::read_exact`], which retries on interrupts.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/read.rs","byte_start":190736,"byte_end":190814,"line_start":30,"line_end":30,"column_start":1,"column_end":79}},{"value":"/ All other errors from the underlying reader, including when it does not","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/read.rs","byte_start":190815,"byte_end":190890,"line_start":31,"line_end":31,"column_start":1,"column_end":76}},{"value":"/ have enough data, will only be reported through [`try_fill_bytes`].","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/read.rs","byte_start":190891,"byte_end":190962,"line_start":32,"line_end":32,"column_start":1,"column_end":72}},{"value":"/ The other [`RngCore`] methods will panic in case of an error.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/read.rs","byte_start":190963,"byte_end":191028,"line_start":33,"line_end":33,"column_start":1,"column_end":66}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/read.rs","byte_start":191029,"byte_end":191032,"line_start":34,"line_end":34,"column_start":1,"column_end":4}},{"value":"/ [`OsRng`]: crate::rngs::OsRng","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/read.rs","byte_start":191033,"byte_end":191066,"line_start":35,"line_end":35,"column_start":1,"column_end":34}},{"value":"/ [`try_fill_bytes`]: RngCore::try_fill_bytes","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/read.rs","byte_start":191067,"byte_end":191114,"line_start":36,"line_end":36,"column_start":1,"column_end":48}},{"value":"deprecated(since = \"0.8.4\", note = \"removal due to lack of usage\")","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/read.rs","byte_start":191132,"byte_end":191197,"line_start":38,"line_end":38,"column_start":1,"column_end":66}}]},{"kind":"Method","id":{"krate":0,"index":654},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/read.rs","byte_start":191324,"byte_end":191327,"line_start":45,"line_end":45,"column_start":12,"column_end":15},"name":"new","qualname":"<ReadRng<R>>::new","value":"pub fn new(R) -> ReadRng<R>","parent":null,"children":[],"decl_id":null,"docs":" Create a new `ReadRng` from a `Read`.\n","sig":null,"attributes":[{"value":"/ Create a new `ReadRng` from a `Read`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/read.rs","byte_start":191271,"byte_end":191312,"line_start":44,"line_end":44,"column_start":5,"column_end":46}}]},{"kind":"Struct","id":{"krate":0,"index":2351},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/read.rs","byte_start":192265,"byte_end":192274,"line_start":82,"line_end":82,"column_start":12,"column_end":21},"name":"ReadError","qualname":"::rngs::adapter::read::ReadError","value":"","parent":null,"children":[],"decl_id":null,"docs":" `ReadRng` error type\n","sig":null,"attributes":[{"value":"/ `ReadRng` error type","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/read.rs","byte_start":192183,"byte_end":192207,"line_start":79,"line_end":79,"column_start":1,"column_end":25}},{"value":"deprecated(since = \"0.8.4\")","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/read.rs","byte_start":192225,"byte_end":192253,"line_start":81,"line_end":81,"column_start":1,"column_end":29}}]},{"kind":"Struct","id":{"krate":0,"index":2356},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":197445,"byte_end":197457,"line_start":85,"line_end":85,"column_start":12,"column_end":24},"name":"ReseedingRng","qualname":"::rngs::adapter::reseeding::ReseedingRng","value":"","parent":null,"children":[],"decl_id":null,"docs":" A wrapper around any PRNG that implements [`BlockRngCore`], that adds the\n ability to reseed it.","sig":null,"attributes":[{"value":"/ A wrapper around any PRNG that implements [`BlockRngCore`], that adds the","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":194623,"byte_end":194700,"line_start":18,"line_end":18,"column_start":1,"column_end":78}},{"value":"/ ability to reseed it.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":194701,"byte_end":194726,"line_start":19,"line_end":19,"column_start":1,"column_end":26}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":194727,"byte_end":194730,"line_start":20,"line_end":20,"column_start":1,"column_end":4}},{"value":"/ `ReseedingRng` reseeds the underlying PRNG in the following cases:","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":194731,"byte_end":194801,"line_start":21,"line_end":21,"column_start":1,"column_end":71}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":194802,"byte_end":194805,"line_start":22,"line_end":22,"column_start":1,"column_end":4}},{"value":"/ - On a manual call to [`reseed()`].","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":194806,"byte_end":194845,"line_start":23,"line_end":23,"column_start":1,"column_end":40}},{"value":"/ - After `clone()`, the clone will be reseeded on first use.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":194846,"byte_end":194909,"line_start":24,"line_end":24,"column_start":1,"column_end":64}},{"value":"/ - When a process is forked on UNIX, the RNGs in both the parent and child","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":194910,"byte_end":194987,"line_start":25,"line_end":25,"column_start":1,"column_end":78}},{"value":"/ processes will be reseeded just before the next call to","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":194988,"byte_end":195049,"line_start":26,"line_end":26,"column_start":1,"column_end":62}},{"value":"/ [`BlockRngCore::generate`], i.e. \"soon\". For ChaCha and Hc128 this is a","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":195050,"byte_end":195127,"line_start":27,"line_end":27,"column_start":1,"column_end":78}},{"value":"/ maximum of fifteen `u32` values before reseeding.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":195128,"byte_end":195183,"line_start":28,"line_end":28,"column_start":1,"column_end":56}},{"value":"/ - After the PRNG has generated a configurable number of random bytes.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":195184,"byte_end":195257,"line_start":29,"line_end":29,"column_start":1,"column_end":74}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":195258,"byte_end":195261,"line_start":30,"line_end":30,"column_start":1,"column_end":4}},{"value":"/ # When should reseeding after a fixed number of generated bytes be used?","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":195262,"byte_end":195338,"line_start":31,"line_end":31,"column_start":1,"column_end":77}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":195339,"byte_end":195342,"line_start":32,"line_end":32,"column_start":1,"column_end":4}},{"value":"/ Reseeding after a fixed number of generated bytes is never strictly","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":195343,"byte_end":195414,"line_start":33,"line_end":33,"column_start":1,"column_end":72}},{"value":"/ *necessary*. Cryptographic PRNGs don't have a limited number of bytes they","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":195415,"byte_end":195493,"line_start":34,"line_end":34,"column_start":1,"column_end":79}},{"value":"/ can output, or at least not a limit reachable in any practical way. There is","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":195494,"byte_end":195574,"line_start":35,"line_end":35,"column_start":1,"column_end":81}},{"value":"/ no such thing as 'running out of entropy'.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":195575,"byte_end":195621,"line_start":36,"line_end":36,"column_start":1,"column_end":47}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":195622,"byte_end":195625,"line_start":37,"line_end":37,"column_start":1,"column_end":4}},{"value":"/ Occasionally reseeding can be seen as some form of 'security in depth'. Even","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":195626,"byte_end":195706,"line_start":38,"line_end":38,"column_start":1,"column_end":81}},{"value":"/ if in the future a cryptographic weakness is found in the CSPRNG being used,","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":195707,"byte_end":195787,"line_start":39,"line_end":39,"column_start":1,"column_end":81}},{"value":"/ or a flaw in the implementation, occasionally reseeding should make","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":195788,"byte_end":195859,"line_start":40,"line_end":40,"column_start":1,"column_end":72}},{"value":"/ exploiting it much more difficult or even impossible.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":195860,"byte_end":195917,"line_start":41,"line_end":41,"column_start":1,"column_end":58}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":195918,"byte_end":195921,"line_start":42,"line_end":42,"column_start":1,"column_end":4}},{"value":"/ Use [`ReseedingRng::new`] with a `threshold` of `0` to disable reseeding","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":195922,"byte_end":195998,"line_start":43,"line_end":43,"column_start":1,"column_end":77}},{"value":"/ after a fixed number of generated bytes.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":195999,"byte_end":196043,"line_start":44,"line_end":44,"column_start":1,"column_end":45}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":196044,"byte_end":196047,"line_start":45,"line_end":45,"column_start":1,"column_end":4}},{"value":"/ # Limitations","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":196048,"byte_end":196065,"line_start":46,"line_end":46,"column_start":1,"column_end":18}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":196066,"byte_end":196069,"line_start":47,"line_end":47,"column_start":1,"column_end":4}},{"value":"/ It is recommended that a `ReseedingRng` (including `ThreadRng`) not be used","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":196070,"byte_end":196149,"line_start":48,"line_end":48,"column_start":1,"column_end":80}},{"value":"/ from a fork handler.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":196150,"byte_end":196174,"line_start":49,"line_end":49,"column_start":1,"column_end":25}},{"value":"/ Use `OsRng` or `getrandom`, or defer your use of the RNG until later.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":196175,"byte_end":196248,"line_start":50,"line_end":50,"column_start":1,"column_end":74}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":196249,"byte_end":196252,"line_start":51,"line_end":51,"column_start":1,"column_end":4}},{"value":"/ # Error handling","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":196253,"byte_end":196273,"line_start":52,"line_end":52,"column_start":1,"column_end":21}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":196274,"byte_end":196277,"line_start":53,"line_end":53,"column_start":1,"column_end":4}},{"value":"/ Although unlikely, reseeding the wrapped PRNG can fail. `ReseedingRng` will","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":196278,"byte_end":196357,"line_start":54,"line_end":54,"column_start":1,"column_end":80}},{"value":"/ never panic but try to handle the error intelligently through some","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":196358,"byte_end":196428,"line_start":55,"line_end":55,"column_start":1,"column_end":71}},{"value":"/ combination of retrying and delaying reseeding until later.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":196429,"byte_end":196492,"line_start":56,"line_end":56,"column_start":1,"column_end":64}},{"value":"/ If handling the source error fails `ReseedingRng` will continue generating","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":196493,"byte_end":196571,"line_start":57,"line_end":57,"column_start":1,"column_end":79}},{"value":"/ data from the wrapped PRNG without reseeding.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":196572,"byte_end":196621,"line_start":58,"line_end":58,"column_start":1,"column_end":50}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":196622,"byte_end":196625,"line_start":59,"line_end":59,"column_start":1,"column_end":4}},{"value":"/ Manually calling [`reseed()`] will not have this retry or delay logic, but","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":196626,"byte_end":196704,"line_start":60,"line_end":60,"column_start":1,"column_end":79}},{"value":"/ reports the error.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":196705,"byte_end":196727,"line_start":61,"line_end":61,"column_start":1,"column_end":23}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":196728,"byte_end":196731,"line_start":62,"line_end":62,"column_start":1,"column_end":4}},{"value":"/ # Example","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":196732,"byte_end":196745,"line_start":63,"line_end":63,"column_start":1,"column_end":14}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":196746,"byte_end":196749,"line_start":64,"line_end":64,"column_start":1,"column_end":4}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":196750,"byte_end":196757,"line_start":65,"line_end":65,"column_start":1,"column_end":8}},{"value":"/ use rand::prelude::*;","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":196758,"byte_end":196783,"line_start":66,"line_end":66,"column_start":1,"column_end":26}},{"value":"/ use rand_chacha::ChaCha20Core; // Internal part of ChaChaRng that","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":196784,"byte_end":196853,"line_start":67,"line_end":67,"column_start":1,"column_end":70}},{"value":"/ // implements BlockRngCore","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":196854,"byte_end":196913,"line_start":68,"line_end":68,"column_start":1,"column_end":60}},{"value":"/ use rand::rngs::OsRng;","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":196914,"byte_end":196940,"line_start":69,"line_end":69,"column_start":1,"column_end":27}},{"value":"/ use rand::rngs::adapter::ReseedingRng;","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":196941,"byte_end":196983,"line_start":70,"line_end":70,"column_start":1,"column_end":43}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":196984,"byte_end":196987,"line_start":71,"line_end":71,"column_start":1,"column_end":4}},{"value":"/ let prng = ChaCha20Core::from_entropy();","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":196988,"byte_end":197032,"line_start":72,"line_end":72,"column_start":1,"column_end":45}},{"value":"/ let mut reseeding_rng = ReseedingRng::new(prng, 0, OsRng);","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":197033,"byte_end":197095,"line_start":73,"line_end":73,"column_start":1,"column_end":63}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":197096,"byte_end":197099,"line_start":74,"line_end":74,"column_start":1,"column_end":4}},{"value":"/ println!(\"{}\", reseeding_rng.gen::<u64>());","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":197100,"byte_end":197147,"line_start":75,"line_end":75,"column_start":1,"column_end":48}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":197148,"byte_end":197151,"line_start":76,"line_end":76,"column_start":1,"column_end":4}},{"value":"/ let mut cloned_rng = reseeding_rng.clone();","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":197152,"byte_end":197199,"line_start":77,"line_end":77,"column_start":1,"column_end":48}},{"value":"/ assert!(reseeding_rng.gen::<u64>() != cloned_rng.gen::<u64>());","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":197200,"byte_end":197267,"line_start":78,"line_end":78,"column_start":1,"column_end":68}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":197268,"byte_end":197275,"line_start":79,"line_end":79,"column_start":1,"column_end":8}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":197276,"byte_end":197279,"line_start":80,"line_end":80,"column_start":1,"column_end":4}},{"value":"/ [`BlockRngCore`]: rand_core::block::BlockRngCore","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":197280,"byte_end":197332,"line_start":81,"line_end":81,"column_start":1,"column_end":53}},{"value":"/ [`ReseedingRng::new`]: ReseedingRng::new","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":197333,"byte_end":197377,"line_start":82,"line_end":82,"column_start":1,"column_end":45}},{"value":"/ [`reseed()`]: ReseedingRng::reseed","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":197378,"byte_end":197416,"line_start":83,"line_end":83,"column_start":1,"column_end":39}}]},{"kind":"Method","id":{"krate":0,"index":694},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":197961,"byte_end":197964,"line_start":101,"line_end":101,"column_start":12,"column_end":15},"name":"new","qualname":"<ReseedingRng<R, Rsdr>>::new","value":"pub fn new(R, u64, Rsdr) -> Self","parent":null,"children":[],"decl_id":null,"docs":" Create a new `ReseedingRng` from an existing PRNG, combined with a RNG\n to use as reseeder.","sig":null,"attributes":[{"value":"/ Create a new `ReseedingRng` from an existing PRNG, combined with a RNG","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":197664,"byte_end":197738,"line_start":95,"line_end":95,"column_start":5,"column_end":79}},{"value":"/ to use as reseeder.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":197743,"byte_end":197766,"line_start":96,"line_end":96,"column_start":5,"column_end":28}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":197771,"byte_end":197774,"line_start":97,"line_end":97,"column_start":5,"column_end":8}},{"value":"/ `threshold` sets the number of generated bytes after which to reseed the","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":197779,"byte_end":197855,"line_start":98,"line_end":98,"column_start":5,"column_end":81}},{"value":"/ PRNG. Set it to zero to never reseed based on the number of generated","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":197860,"byte_end":197933,"line_start":99,"line_end":99,"column_start":5,"column_end":78}},{"value":"/ values.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":197938,"byte_end":197949,"line_start":100,"line_end":100,"column_start":5,"column_end":16}}]},{"kind":"Method","id":{"krate":0,"index":695},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":198149,"byte_end":198155,"line_start":106,"line_end":106,"column_start":12,"column_end":18},"name":"reseed","qualname":"<ReseedingRng<R, Rsdr>>::reseed","value":"pub fn reseed(&mut Self) -> Result<(), Error>","parent":null,"children":[],"decl_id":null,"docs":" Reseed the internal PRNG.\n","sig":null,"attributes":[{"value":"/ Reseed the internal PRNG.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":198108,"byte_end":198137,"line_start":105,"line_end":105,"column_start":5,"column_end":34}}]},{"kind":"Mod","id":{"krate":0,"index":761},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mock.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1},"name":"mock","qualname":"::rngs::mock","value":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mock.rs","parent":null,"children":[{"krate":0,"index":762},{"krate":0,"index":763},{"krate":0,"index":766},{"krate":0,"index":769},{"krate":0,"index":2377},{"krate":0,"index":2380},{"krate":0,"index":2382},{"krate":0,"index":2384},{"krate":0,"index":2385},{"krate":0,"index":2388},{"krate":0,"index":2389},{"krate":0,"index":772},{"krate":0,"index":774}],"decl_id":null,"docs":" Mock random number generator\n","sig":null,"attributes":[{"value":"/ Mock random number generator","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mock.rs","byte_start":207034,"byte_end":207066,"line_start":9,"line_end":9,"column_start":1,"column_end":33}}]},{"kind":"Struct","id":{"krate":0,"index":2377},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mock.rs","byte_start":207736,"byte_end":207743,"line_start":32,"line_end":32,"column_start":12,"column_end":19},"name":"StepRng","qualname":"::rngs::mock::StepRng","value":"StepRng { }","parent":null,"children":[{"krate":0,"index":2378},{"krate":0,"index":2379}],"decl_id":null,"docs":" A simple implementation of `RngCore` for testing purposes.","sig":null,"attributes":[{"value":"/ A simple implementation of `RngCore` for testing purposes.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mock.rs","byte_start":207174,"byte_end":207236,"line_start":16,"line_end":16,"column_start":1,"column_end":63}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mock.rs","byte_start":207237,"byte_end":207240,"line_start":17,"line_end":17,"column_start":1,"column_end":4}},{"value":"/ This generates an arithmetic sequence (i.e. adds a constant each step)","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mock.rs","byte_start":207241,"byte_end":207315,"line_start":18,"line_end":18,"column_start":1,"column_end":75}},{"value":"/ over a `u64` number, using wrapping arithmetic. If the increment is 0","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mock.rs","byte_start":207316,"byte_end":207389,"line_start":19,"line_end":19,"column_start":1,"column_end":74}},{"value":"/ the generator yields a constant.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mock.rs","byte_start":207390,"byte_end":207426,"line_start":20,"line_end":20,"column_start":1,"column_end":37}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mock.rs","byte_start":207427,"byte_end":207430,"line_start":21,"line_end":21,"column_start":1,"column_end":4}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mock.rs","byte_start":207431,"byte_end":207438,"line_start":22,"line_end":22,"column_start":1,"column_end":8}},{"value":"/ use rand::Rng;","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mock.rs","byte_start":207439,"byte_end":207457,"line_start":23,"line_end":23,"column_start":1,"column_end":19}},{"value":"/ use rand::rngs::mock::StepRng;","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mock.rs","byte_start":207458,"byte_end":207492,"line_start":24,"line_end":24,"column_start":1,"column_end":35}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mock.rs","byte_start":207493,"byte_end":207496,"line_start":25,"line_end":25,"column_start":1,"column_end":4}},{"value":"/ let mut my_rng = StepRng::new(2, 1);","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mock.rs","byte_start":207497,"byte_end":207537,"line_start":26,"line_end":26,"column_start":1,"column_end":41}},{"value":"/ let sample: [u64; 3] = my_rng.gen();","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mock.rs","byte_start":207538,"byte_end":207578,"line_start":27,"line_end":27,"column_start":1,"column_end":41}},{"value":"/ assert_eq!(sample, [2, 3, 4]);","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mock.rs","byte_start":207579,"byte_end":207613,"line_start":28,"line_end":28,"column_start":1,"column_end":35}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mock.rs","byte_start":207614,"byte_end":207621,"line_start":29,"line_end":29,"column_start":1,"column_end":8}}]},{"kind":"Method","id":{"krate":0,"index":773},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mock.rs","byte_start":207933,"byte_end":207936,"line_start":40,"line_end":40,"column_start":12,"column_end":15},"name":"new","qualname":"<StepRng>::new","value":"pub fn new(u64, u64) -> Self","parent":null,"children":[],"decl_id":null,"docs":" Create a `StepRng`, yielding an arithmetic sequence starting with\n `initial` and incremented by `increment` each time.\n","sig":null,"attributes":[{"value":"/ Create a `StepRng`, yielding an arithmetic sequence starting with","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mock.rs","byte_start":207792,"byte_end":207861,"line_start":38,"line_end":38,"column_start":5,"column_end":74}},{"value":"/ `initial` and incremented by `increment` each time.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mock.rs","byte_start":207866,"byte_end":207921,"line_start":39,"line_end":39,"column_start":5,"column_end":60}}]},{"kind":"Struct","id":{"krate":0,"index":2391},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/std.rs","byte_start":210439,"byte_end":210445,"line_start":34,"line_end":34,"column_start":12,"column_end":18},"name":"StdRng","qualname":"::rngs::std::StdRng","value":"","parent":null,"children":[],"decl_id":null,"docs":" The standard RNG. The PRNG algorithm in `StdRng` is chosen to be efficient\n on the current platform, to be statistically strong and unpredictable\n (meaning a cryptographically secure PRNG).","sig":null,"attributes":[{"value":"/ The standard RNG. The PRNG algorithm in `StdRng` is chosen to be efficient","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/std.rs","byte_start":209509,"byte_end":209587,"line_start":17,"line_end":17,"column_start":1,"column_end":79}},{"value":"/ on the current platform, to be statistically strong and unpredictable","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/std.rs","byte_start":209588,"byte_end":209661,"line_start":18,"line_end":18,"column_start":1,"column_end":74}},{"value":"/ (meaning a cryptographically secure PRNG).","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/std.rs","byte_start":209662,"byte_end":209708,"line_start":19,"line_end":19,"column_start":1,"column_end":47}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/std.rs","byte_start":209709,"byte_end":209712,"line_start":20,"line_end":20,"column_start":1,"column_end":4}},{"value":"/ The current algorithm used is the ChaCha block cipher with 12 rounds. Please","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/std.rs","byte_start":209713,"byte_end":209793,"line_start":21,"line_end":21,"column_start":1,"column_end":81}},{"value":"/ see this relevant [rand issue] for the discussion. This may change as new ","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/std.rs","byte_start":209794,"byte_end":209872,"line_start":22,"line_end":22,"column_start":1,"column_end":79}},{"value":"/ evidence of cipher security and performance becomes available.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/std.rs","byte_start":209873,"byte_end":209939,"line_start":23,"line_end":23,"column_start":1,"column_end":67}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/std.rs","byte_start":209940,"byte_end":209943,"line_start":24,"line_end":24,"column_start":1,"column_end":4}},{"value":"/ The algorithm is deterministic but should not be considered reproducible","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/std.rs","byte_start":209944,"byte_end":210020,"line_start":25,"line_end":25,"column_start":1,"column_end":77}},{"value":"/ due to dependence on configuration and possible replacement in future","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/std.rs","byte_start":210021,"byte_end":210094,"line_start":26,"line_end":26,"column_start":1,"column_end":74}},{"value":"/ library versions. For a secure reproducible generator, we recommend use of","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/std.rs","byte_start":210095,"byte_end":210173,"line_start":27,"line_end":27,"column_start":1,"column_end":79}},{"value":"/ the [rand_chacha] crate directly.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/std.rs","byte_start":210174,"byte_end":210211,"line_start":28,"line_end":28,"column_start":1,"column_end":38}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/std.rs","byte_start":210212,"byte_end":210215,"line_start":29,"line_end":29,"column_start":1,"column_end":4}},{"value":"/ [rand_chacha]: https://crates.io/crates/rand_chacha","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/std.rs","byte_start":210216,"byte_end":210271,"line_start":30,"line_end":30,"column_start":1,"column_end":56}},{"value":"/ [rand issue]: https://github.com/rust-random/rand/issues/932","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/std.rs","byte_start":210272,"byte_end":210336,"line_start":31,"line_end":31,"column_start":1,"column_end":65}}]},{"kind":"Struct","id":{"krate":0,"index":2405},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/thread.rs","byte_start":214779,"byte_end":214788,"line_start":62,"line_end":62,"column_start":12,"column_end":21},"name":"ThreadRng","qualname":"::rngs::thread::ThreadRng","value":"ThreadRng { }","parent":null,"children":[{"krate":0,"index":2406}],"decl_id":null,"docs":" A reference to the thread-local generator","sig":null,"attributes":[{"value":"/ A reference to the thread-local generator","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/thread.rs","byte_start":213625,"byte_end":213670,"line_start":40,"line_end":40,"column_start":1,"column_end":46}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/thread.rs","byte_start":213671,"byte_end":213674,"line_start":41,"line_end":41,"column_start":1,"column_end":4}},{"value":"/ An instance can be obtained via [`thread_rng`] or via `ThreadRng::default()`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/thread.rs","byte_start":213675,"byte_end":213756,"line_start":42,"line_end":42,"column_start":1,"column_end":82}},{"value":"/ This handle is safe to use everywhere (including thread-local destructors),","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/thread.rs","byte_start":213757,"byte_end":213836,"line_start":43,"line_end":43,"column_start":1,"column_end":80}},{"value":"/ though it is recommended not to use inside a fork handler.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/thread.rs","byte_start":213837,"byte_end":213899,"line_start":44,"line_end":44,"column_start":1,"column_end":63}},{"value":"/ The handle cannot be passed between threads (is not `Send` or `Sync`).","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/thread.rs","byte_start":213900,"byte_end":213974,"line_start":45,"line_end":45,"column_start":1,"column_end":75}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/thread.rs","byte_start":213975,"byte_end":213978,"line_start":46,"line_end":46,"column_start":1,"column_end":4}},{"value":"/ `ThreadRng` uses the same PRNG as [`StdRng`] for security and performance","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/thread.rs","byte_start":213979,"byte_end":214056,"line_start":47,"line_end":47,"column_start":1,"column_end":78}},{"value":"/ and is automatically seeded from [`OsRng`].","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/thread.rs","byte_start":214057,"byte_end":214104,"line_start":48,"line_end":48,"column_start":1,"column_end":48}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/thread.rs","byte_start":214105,"byte_end":214108,"line_start":49,"line_end":49,"column_start":1,"column_end":4}},{"value":"/ Unlike `StdRng`, `ThreadRng` uses the [`ReseedingRng`] wrapper to reseed","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/thread.rs","byte_start":214109,"byte_end":214186,"line_start":50,"line_end":50,"column_start":1,"column_end":78}},{"value":"/ the PRNG from fresh entropy every 64 kiB of random data as well as after a","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/thread.rs","byte_start":214187,"byte_end":214265,"line_start":51,"line_end":51,"column_start":1,"column_end":79}},{"value":"/ fork on Unix (though not quite immediately; see documentation of","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/thread.rs","byte_start":214266,"byte_end":214334,"line_start":52,"line_end":52,"column_start":1,"column_end":69}},{"value":"/ [`ReseedingRng`]).","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/thread.rs","byte_start":214335,"byte_end":214357,"line_start":53,"line_end":53,"column_start":1,"column_end":23}},{"value":"/ Note that the reseeding is done as an extra precaution against side-channel","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/thread.rs","byte_start":214358,"byte_end":214437,"line_start":54,"line_end":54,"column_start":1,"column_end":80}},{"value":"/ attacks and mis-use (e.g. if somehow weak entropy were supplied initially).","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/thread.rs","byte_start":214438,"byte_end":214517,"line_start":55,"line_end":55,"column_start":1,"column_end":80}},{"value":"/ The PRNG algorithms used are assumed to be secure.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/thread.rs","byte_start":214518,"byte_end":214572,"line_start":56,"line_end":56,"column_start":1,"column_end":55}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/thread.rs","byte_start":214573,"byte_end":214576,"line_start":57,"line_end":57,"column_start":1,"column_end":4}},{"value":"/ [`ReseedingRng`]: crate::rngs::adapter::ReseedingRng","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/thread.rs","byte_start":214577,"byte_end":214633,"line_start":58,"line_end":58,"column_start":1,"column_end":57}},{"value":"/ [`StdRng`]: crate::rngs::StdRng","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/thread.rs","byte_start":214634,"byte_end":214669,"line_start":59,"line_end":59,"column_start":1,"column_end":36}}]},{"kind":"Function","id":{"krate":0,"index":843},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/thread.rs","byte_start":215875,"byte_end":215885,"line_start":88,"line_end":88,"column_start":8,"column_end":18},"name":"thread_rng","qualname":"::rngs::thread::thread_rng","value":"pub fn thread_rng() -> ThreadRng","parent":null,"children":[],"decl_id":null,"docs":" Retrieve the lazily-initialized thread-local random number generator,\n seeded by the system. Intended to be used in method chaining style,\n e.g. `thread_rng().gen::<i32>()`, or cached locally, e.g.\n `let mut rng = thread_rng();`. Invoked by the `Default` trait, making\n `ThreadRng::default()` equivalent.","sig":null,"attributes":[{"value":"/ Retrieve the lazily-initialized thread-local random number generator,","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/thread.rs","byte_start":215424,"byte_end":215497,"line_start":80,"line_end":80,"column_start":1,"column_end":74}},{"value":"/ seeded by the system. Intended to be used in method chaining style,","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/thread.rs","byte_start":215498,"byte_end":215569,"line_start":81,"line_end":81,"column_start":1,"column_end":72}},{"value":"/ e.g. `thread_rng().gen::<i32>()`, or cached locally, e.g.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/thread.rs","byte_start":215570,"byte_end":215631,"line_start":82,"line_end":82,"column_start":1,"column_end":62}},{"value":"/ `let mut rng = thread_rng();`. Invoked by the `Default` trait, making","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/thread.rs","byte_start":215632,"byte_end":215706,"line_start":83,"line_end":83,"column_start":1,"column_end":75}},{"value":"/ `ThreadRng::default()` equivalent.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/thread.rs","byte_start":215707,"byte_end":215745,"line_start":84,"line_end":84,"column_start":1,"column_end":39}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/thread.rs","byte_start":215746,"byte_end":215749,"line_start":85,"line_end":85,"column_start":1,"column_end":4}},{"value":"/ For more information see [`ThreadRng`].","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/thread.rs","byte_start":215750,"byte_end":215793,"line_start":86,"line_end":86,"column_start":1,"column_end":44}}]},{"kind":"Mod","id":{"krate":0,"index":862},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1},"name":"seq","qualname":"::seq","value":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","parent":null,"children":[{"krate":0,"index":863},{"krate":0,"index":985},{"krate":0,"index":988},{"krate":0,"index":991},{"krate":0,"index":992},{"krate":0,"index":995},{"krate":0,"index":998},{"krate":0,"index":1001},{"krate":0,"index":1004},{"krate":0,"index":1032},{"krate":0,"index":1042},{"krate":0,"index":1086},{"krate":0,"index":2449},{"krate":0,"index":2456},{"krate":0,"index":1088},{"krate":0,"index":1096},{"krate":0,"index":1101}],"decl_id":null,"docs":" Sequence-related functionality","sig":null,"attributes":[{"value":"/ Sequence-related functionality","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":217770,"byte_end":217804,"line_start":9,"line_end":9,"column_start":1,"column_end":35}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":217805,"byte_end":217808,"line_start":10,"line_end":10,"column_start":1,"column_end":4}},{"value":"/ This module provides:","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":217809,"byte_end":217834,"line_start":11,"line_end":11,"column_start":1,"column_end":26}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":217835,"byte_end":217838,"line_start":12,"line_end":12,"column_start":1,"column_end":4}},{"value":"/ * [`SliceRandom`] slice sampling and mutation","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":217839,"byte_end":217890,"line_start":13,"line_end":13,"column_start":1,"column_end":52}},{"value":"/ * [`IteratorRandom`] iterator sampling","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":217891,"byte_end":217935,"line_start":14,"line_end":14,"column_start":1,"column_end":45}},{"value":"/ * [`index::sample`] low-level API to choose multiple indices from","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":217936,"byte_end":218007,"line_start":15,"line_end":15,"column_start":1,"column_end":72}},{"value":"/ `0..length`","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":218008,"byte_end":218027,"line_start":16,"line_end":16,"column_start":1,"column_end":20}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":218028,"byte_end":218031,"line_start":17,"line_end":17,"column_start":1,"column_end":4}},{"value":"/ Also see:","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":218032,"byte_end":218045,"line_start":18,"line_end":18,"column_start":1,"column_end":14}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":218046,"byte_end":218049,"line_start":19,"line_end":19,"column_start":1,"column_end":4}},{"value":"/ * [`crate::distributions::WeightedIndex`] distribution which provides","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":218050,"byte_end":218125,"line_start":20,"line_end":20,"column_start":1,"column_end":76}},{"value":"/ weighted index sampling.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":218126,"byte_end":218158,"line_start":21,"line_end":21,"column_start":1,"column_end":33}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":218159,"byte_end":218162,"line_start":22,"line_end":22,"column_start":1,"column_end":4}},{"value":"/ In order to make results reproducible across 32-64 bit architectures, all","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":218163,"byte_end":218240,"line_start":23,"line_end":23,"column_start":1,"column_end":78}},{"value":"/ `usize` indices are sampled as a `u32` where possible (also providing a","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":218241,"byte_end":218316,"line_start":24,"line_end":24,"column_start":1,"column_end":76}},{"value":"/ small performance boost in some cases).","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":218317,"byte_end":218360,"line_start":25,"line_end":25,"column_start":1,"column_end":44}}]},{"kind":"Mod","id":{"krate":0,"index":863},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1},"name":"index","qualname":"::seq::index","value":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","parent":null,"children":[{"krate":0,"index":864},{"krate":0,"index":867},{"krate":0,"index":868},{"krate":0,"index":871},{"krate":0,"index":874},{"krate":0,"index":877},{"krate":0,"index":880},{"krate":0,"index":881},{"krate":0,"index":884},{"krate":0,"index":885},{"krate":0,"index":888},{"krate":0,"index":891},{"krate":0,"index":2416},{"krate":0,"index":2423},{"krate":0,"index":2425},{"krate":0,"index":894},{"krate":0,"index":901},{"krate":0,"index":905},{"krate":0,"index":910},{"krate":0,"index":912},{"krate":0,"index":2427},{"krate":0,"index":2435},{"krate":0,"index":914},{"krate":0,"index":921},{"krate":0,"index":2438},{"krate":0,"index":2445},{"krate":0,"index":2447},{"krate":0,"index":923},{"krate":0,"index":930},{"krate":0,"index":931},{"krate":0,"index":938},{"krate":0,"index":942},{"krate":0,"index":965},{"krate":0,"index":968},{"krate":0,"index":970},{"krate":0,"index":974},{"krate":0,"index":978},{"krate":0,"index":982}],"decl_id":null,"docs":" Low-level API for sampling indices\n","sig":null,"attributes":[{"value":"cfg(feature = \"alloc\")","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":218363,"byte_end":218388,"line_start":28,"line_end":28,"column_start":1,"column_end":26}},{"value":"/ Low-level API for sampling indices","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":264071,"byte_end":264109,"line_start":9,"line_end":9,"column_start":1,"column_end":39}}]},{"kind":"TupleVariant","id":{"krate":0,"index":2417},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":264867,"byte_end":264870,"line_start":35,"line_end":35,"column_start":5,"column_end":8},"name":"U32","qualname":"::seq::index::IndexVec::U32","value":"IndexVec::U32(Vec<u32>)","parent":{"krate":0,"index":2416},"children":[],"decl_id":null,"docs":"","sig":null,"attributes":[]},{"kind":"TupleVariant","id":{"krate":0,"index":2420},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":264905,"byte_end":264910,"line_start":37,"line_end":37,"column_start":5,"column_end":10},"name":"USize","qualname":"::seq::index::IndexVec::USize","value":"IndexVec::USize(Vec<usize>)","parent":{"krate":0,"index":2416},"children":[],"decl_id":null,"docs":"","sig":null,"attributes":[]},{"kind":"Enum","id":{"krate":0,"index":2416},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":264833,"byte_end":264841,"line_start":33,"line_end":33,"column_start":10,"column_end":18},"name":"IndexVec","qualname":"::seq::index::IndexVec","value":"pub enum IndexVec { U32(Vec<u32>), USize(Vec<usize>), }","parent":null,"children":[{"krate":0,"index":2417},{"krate":0,"index":2420}],"decl_id":null,"docs":" A vector of indices.","sig":null,"attributes":[{"value":"/ A vector of indices.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":264655,"byte_end":264679,"line_start":28,"line_end":28,"column_start":1,"column_end":25}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":264680,"byte_end":264683,"line_start":29,"line_end":29,"column_start":1,"column_end":4}},{"value":"/ Multiple internal representations are possible.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":264684,"byte_end":264735,"line_start":30,"line_end":30,"column_start":1,"column_end":52}}]},{"kind":"Method","id":{"krate":0,"index":895},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":265006,"byte_end":265009,"line_start":43,"line_end":43,"column_start":12,"column_end":15},"name":"len","qualname":"<IndexVec>::len","value":"pub fn len(&Self) -> usize","parent":null,"children":[],"decl_id":null,"docs":" Returns the number of indices\n","sig":null,"attributes":[{"value":"/ Returns the number of indices","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":264947,"byte_end":264980,"line_start":41,"line_end":41,"column_start":5,"column_end":38}},{"value":"inline","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":264985,"byte_end":264994,"line_start":42,"line_end":42,"column_start":5,"column_end":14}}]},{"kind":"Method","id":{"krate":0,"index":896},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":265227,"byte_end":265235,"line_start":52,"line_end":52,"column_start":12,"column_end":20},"name":"is_empty","qualname":"<IndexVec>::is_empty","value":"pub fn is_empty(&Self) -> bool","parent":null,"children":[],"decl_id":null,"docs":" Returns `true` if the length is 0.\n","sig":null,"attributes":[{"value":"/ Returns `true` if the length is 0.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":265163,"byte_end":265201,"line_start":50,"line_end":50,"column_start":5,"column_end":43}},{"value":"inline","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":265206,"byte_end":265215,"line_start":51,"line_end":51,"column_start":5,"column_end":14}}]},{"kind":"Method","id":{"krate":0,"index":897},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":265572,"byte_end":265577,"line_start":64,"line_end":64,"column_start":12,"column_end":17},"name":"index","qualname":"<IndexVec>::index","value":"pub fn index(&Self, usize) -> usize","parent":null,"children":[],"decl_id":null,"docs":" Return the value at the given `index`.","sig":null,"attributes":[{"value":"/ Return the value at the given `index`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":265398,"byte_end":265440,"line_start":59,"line_end":59,"column_start":5,"column_end":47}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":265445,"byte_end":265448,"line_start":60,"line_end":60,"column_start":5,"column_end":8}},{"value":"/ (Note: we cannot implement [`std::ops::Index`] because of lifetime","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":265453,"byte_end":265523,"line_start":61,"line_end":61,"column_start":5,"column_end":75}},{"value":"/ restrictions.)","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":265528,"byte_end":265546,"line_start":62,"line_end":62,"column_start":5,"column_end":23}},{"value":"inline","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":265551,"byte_end":265560,"line_start":63,"line_end":63,"column_start":5,"column_end":14}}]},{"kind":"Method","id":{"krate":0,"index":898},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":265856,"byte_end":265864,"line_start":73,"line_end":73,"column_start":12,"column_end":20},"name":"into_vec","qualname":"<IndexVec>::into_vec","value":"pub fn into_vec(Self) -> Vec<usize>","parent":null,"children":[],"decl_id":null,"docs":" Return result as a `Vec<usize>`. Conversion may or may not be trivial.\n","sig":null,"attributes":[{"value":"/ Return result as a `Vec<usize>`. Conversion may or may not be trivial.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":265756,"byte_end":265830,"line_start":71,"line_end":71,"column_start":5,"column_end":79}},{"value":"inline","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":265835,"byte_end":265844,"line_start":72,"line_end":72,"column_start":5,"column_end":14}}]},{"kind":"Method","id":{"krate":0,"index":900},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":266129,"byte_end":266133,"line_start":82,"line_end":82,"column_start":12,"column_end":16},"name":"iter","qualname":"<IndexVec>::iter","value":"pub fn iter(&Self) -> IndexVecIter","parent":null,"children":[],"decl_id":null,"docs":" Iterate over the indices as a sequence of `usize` values\n","sig":null,"attributes":[{"value":"/ Iterate over the indices as a sequence of `usize` values","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":266043,"byte_end":266103,"line_start":80,"line_end":80,"column_start":5,"column_end":65}},{"value":"inline","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":266108,"byte_end":266117,"line_start":81,"line_end":81,"column_start":5,"column_end":14}}]},{"kind":"TupleVariant","id":{"krate":0,"index":2429},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":267698,"byte_end":267701,"line_start":138,"line_end":138,"column_start":5,"column_end":8},"name":"U32","qualname":"::seq::index::IndexVecIter::U32","value":"IndexVecIter::U32(slice::Iter)","parent":{"krate":0,"index":2427},"children":[],"decl_id":null,"docs":"","sig":null,"attributes":[]},{"kind":"TupleVariant","id":{"krate":0,"index":2432},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":267748,"byte_end":267753,"line_start":140,"line_end":140,"column_start":5,"column_end":10},"name":"USize","qualname":"::seq::index::IndexVecIter::USize","value":"IndexVecIter::USize(slice::Iter)","parent":{"krate":0,"index":2427},"children":[],"decl_id":null,"docs":"","sig":null,"attributes":[]},{"kind":"Enum","id":{"krate":0,"index":2427},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":267656,"byte_end":267668,"line_start":136,"line_end":136,"column_start":10,"column_end":22},"name":"IndexVecIter","qualname":"::seq::index::IndexVecIter","value":"pub enum IndexVecIter<'a> { U32(slice::Iter), USize(slice::Iter), }","parent":null,"children":[{"krate":0,"index":2429},{"krate":0,"index":2432}],"decl_id":null,"docs":" Return type of `IndexVec::iter`.\n","sig":null,"attributes":[{"value":"/ Return type of `IndexVec::iter`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":267593,"byte_end":267629,"line_start":134,"line_end":134,"column_start":1,"column_end":37}}]},{"kind":"TupleVariant","id":{"krate":0,"index":2439},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":268489,"byte_end":268492,"line_start":170,"line_end":170,"column_start":5,"column_end":8},"name":"U32","qualname":"::seq::index::IndexVecIntoIter::U32","value":"IndexVecIntoIter::U32(vec::IntoIter<u32>)","parent":{"krate":0,"index":2438},"children":[],"decl_id":null,"docs":"","sig":null,"attributes":[]},{"kind":"TupleVariant","id":{"krate":0,"index":2442},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":268537,"byte_end":268542,"line_start":172,"line_end":172,"column_start":5,"column_end":10},"name":"USize","qualname":"::seq::index::IndexVecIntoIter::USize","value":"IndexVecIntoIter::USize(vec::IntoIter<usize>)","parent":{"krate":0,"index":2438},"children":[],"decl_id":null,"docs":"","sig":null,"attributes":[]},{"kind":"Enum","id":{"krate":0,"index":2438},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":268447,"byte_end":268463,"line_start":168,"line_end":168,"column_start":10,"column_end":26},"name":"IndexVecIntoIter","qualname":"::seq::index::IndexVecIntoIter","value":"pub enum IndexVecIntoIter {\n U32(vec::IntoIter<u32>),\n USize(vec::IntoIter<usize>),\n}","parent":null,"children":[{"krate":0,"index":2439},{"krate":0,"index":2442}],"decl_id":null,"docs":" Return type of `IndexVec::into_iter`.\n","sig":null,"attributes":[{"value":"/ Return type of `IndexVec::into_iter`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":268372,"byte_end":268413,"line_start":166,"line_end":166,"column_start":1,"column_end":42}}]},{"kind":"Function","id":{"krate":0,"index":931},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":270218,"byte_end":270224,"line_start":222,"line_end":222,"column_start":8,"column_end":14},"name":"sample","qualname":"::seq::index::sample","value":"pub fn sample<R>(&mut R, usize, usize) -> IndexVec where R: Rng + ?Sized","parent":null,"children":[],"decl_id":null,"docs":" Randomly sample exactly `amount` distinct indices from `0..length`, and\n return them in random order (fully shuffled).","sig":null,"attributes":[{"value":"/ Randomly sample exactly `amount` distinct indices from `0..length`, and","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":269150,"byte_end":269225,"line_start":200,"line_end":200,"column_start":1,"column_end":76}},{"value":"/ return them in random order (fully shuffled).","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":269226,"byte_end":269275,"line_start":201,"line_end":201,"column_start":1,"column_end":50}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":269276,"byte_end":269279,"line_start":202,"line_end":202,"column_start":1,"column_end":4}},{"value":"/ This method is used internally by the slice sampling methods, but it can","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":269280,"byte_end":269356,"line_start":203,"line_end":203,"column_start":1,"column_end":77}},{"value":"/ sometimes be useful to have the indices themselves so this is provided as","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":269357,"byte_end":269434,"line_start":204,"line_end":204,"column_start":1,"column_end":78}},{"value":"/ an alternative.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":269435,"byte_end":269454,"line_start":205,"line_end":205,"column_start":1,"column_end":20}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":269455,"byte_end":269458,"line_start":206,"line_end":206,"column_start":1,"column_end":4}},{"value":"/ The implementation used is not specified; we automatically select the","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":269459,"byte_end":269532,"line_start":207,"line_end":207,"column_start":1,"column_end":74}},{"value":"/ fastest available algorithm for the `length` and `amount` parameters","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":269533,"byte_end":269605,"line_start":208,"line_end":208,"column_start":1,"column_end":73}},{"value":"/ (based on detailed profiling on an Intel Haswell CPU). Roughly speaking,","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":269606,"byte_end":269682,"line_start":209,"line_end":209,"column_start":1,"column_end":77}},{"value":"/ complexity is `O(amount)`, except that when `amount` is small, performance","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":269683,"byte_end":269761,"line_start":210,"line_end":210,"column_start":1,"column_end":79}},{"value":"/ is closer to `O(amount^2)`, and when `length` is close to `amount` then","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":269762,"byte_end":269837,"line_start":211,"line_end":211,"column_start":1,"column_end":76}},{"value":"/ `O(length)`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":269838,"byte_end":269854,"line_start":212,"line_end":212,"column_start":1,"column_end":17}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":269855,"byte_end":269858,"line_start":213,"line_end":213,"column_start":1,"column_end":4}},{"value":"/ Note that performance is significantly better over `u32` indices than over","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":269859,"byte_end":269937,"line_start":214,"line_end":214,"column_start":1,"column_end":79}},{"value":"/ `u64` indices. Because of this we hide the underlying type behind an","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":269938,"byte_end":270010,"line_start":215,"line_end":215,"column_start":1,"column_end":73}},{"value":"/ abstraction, `IndexVec`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":270011,"byte_end":270039,"line_start":216,"line_end":216,"column_start":1,"column_end":29}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":270040,"byte_end":270043,"line_start":217,"line_end":217,"column_start":1,"column_end":4}},{"value":"/ If an allocation-free `no_std` function is required, it is suggested","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":270044,"byte_end":270116,"line_start":218,"line_end":218,"column_start":1,"column_end":73}},{"value":"/ to adapt the internal `sample_floyd` implementation.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":270117,"byte_end":270173,"line_start":219,"line_end":219,"column_start":1,"column_end":57}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":270174,"byte_end":270177,"line_start":220,"line_end":220,"column_start":1,"column_end":4}},{"value":"/ Panics if `amount > length`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":270178,"byte_end":270210,"line_start":221,"line_end":221,"column_start":1,"column_end":33}}]},{"kind":"Function","id":{"krate":0,"index":938},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":272473,"byte_end":272488,"line_start":277,"line_end":277,"column_start":8,"column_end":23},"name":"sample_weighted","qualname":"::seq::index::sample_weighted","value":"pub fn sample_weighted<R, F, X>(&mut R, usize, F, usize)\n-> Result<IndexVec, WeightedError> where R: Rng + ?Sized, F: Fn(usize) -> X,\nX: Into<f64>","parent":null,"children":[],"decl_id":null,"docs":" Randomly sample exactly `amount` distinct indices from `0..length`, and\n return them in an arbitrary order (there is no guarantee of shuffling or\n ordering). The weights are to be provided by the input function `weights`,\n which will be called once for each index.","sig":null,"attributes":[{"value":"/ Randomly sample exactly `amount` distinct indices from `0..length`, and","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":271699,"byte_end":271774,"line_start":261,"line_end":261,"column_start":1,"column_end":76}},{"value":"/ return them in an arbitrary order (there is no guarantee of shuffling or","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":271775,"byte_end":271851,"line_start":262,"line_end":262,"column_start":1,"column_end":77}},{"value":"/ ordering). The weights are to be provided by the input function `weights`,","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":271852,"byte_end":271930,"line_start":263,"line_end":263,"column_start":1,"column_end":79}},{"value":"/ which will be called once for each index.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":271931,"byte_end":271976,"line_start":264,"line_end":264,"column_start":1,"column_end":46}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":271977,"byte_end":271980,"line_start":265,"line_end":265,"column_start":1,"column_end":4}},{"value":"/ This method is used internally by the slice sampling methods, but it can","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":271981,"byte_end":272057,"line_start":266,"line_end":266,"column_start":1,"column_end":77}},{"value":"/ sometimes be useful to have the indices themselves so this is provided as","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":272058,"byte_end":272135,"line_start":267,"line_end":267,"column_start":1,"column_end":78}},{"value":"/ an alternative.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":272136,"byte_end":272155,"line_start":268,"line_end":268,"column_start":1,"column_end":20}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":272156,"byte_end":272159,"line_start":269,"line_end":269,"column_start":1,"column_end":4}},{"value":"/ This implementation uses `O(length + amount)` space and `O(length)` time","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":272160,"byte_end":272236,"line_start":270,"line_end":270,"column_start":1,"column_end":77}},{"value":"/ if the \"nightly\" feature is enabled, or `O(length)` space and","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":272237,"byte_end":272302,"line_start":271,"line_end":271,"column_start":1,"column_end":66}},{"value":"/ `O(length + amount * log length)` time otherwise.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":272303,"byte_end":272356,"line_start":272,"line_end":272,"column_start":1,"column_end":54}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":272357,"byte_end":272360,"line_start":273,"line_end":273,"column_start":1,"column_end":4}},{"value":"/ Panics if `amount > length`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":272361,"byte_end":272393,"line_start":274,"line_end":274,"column_start":1,"column_end":33}},{"value":"cfg(feature = \"std\")","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":272394,"byte_end":272417,"line_start":275,"line_end":275,"column_start":1,"column_end":24}}]},{"kind":"Trait","id":{"krate":0,"index":1004},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":219310,"byte_end":219321,"line_start":59,"line_end":59,"column_start":11,"column_end":22},"name":"SliceRandom","qualname":"::seq::SliceRandom","value":"SliceRandom","parent":null,"children":[{"krate":0,"index":1005},{"krate":0,"index":1006},{"krate":0,"index":1008},{"krate":0,"index":1010},{"krate":0,"index":1012},{"krate":0,"index":1018},{"krate":0,"index":1024},{"krate":0,"index":1028},{"krate":0,"index":1030}],"decl_id":null,"docs":" Extension trait on slices, providing random mutation and sampling methods.","sig":null,"attributes":[{"value":"/ Extension trait on slices, providing random mutation and sampling methods.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":218728,"byte_end":218806,"line_start":41,"line_end":41,"column_start":1,"column_end":79}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":218807,"byte_end":218810,"line_start":42,"line_end":42,"column_start":1,"column_end":4}},{"value":"/ This trait is implemented on all `[T]` slice types, providing several","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":218811,"byte_end":218884,"line_start":43,"line_end":43,"column_start":1,"column_end":74}},{"value":"/ methods for choosing and shuffling elements. You must `use` this trait:","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":218885,"byte_end":218960,"line_start":44,"line_end":44,"column_start":1,"column_end":76}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":218961,"byte_end":218964,"line_start":45,"line_end":45,"column_start":1,"column_end":4}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":218965,"byte_end":218972,"line_start":46,"line_end":46,"column_start":1,"column_end":8}},{"value":"/ use rand::seq::SliceRandom;","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":218973,"byte_end":219004,"line_start":47,"line_end":47,"column_start":1,"column_end":32}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":219005,"byte_end":219008,"line_start":48,"line_end":48,"column_start":1,"column_end":4}},{"value":"/ let mut rng = rand::thread_rng();","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":219009,"byte_end":219046,"line_start":49,"line_end":49,"column_start":1,"column_end":38}},{"value":"/ let mut bytes = \"Hello, random!\".to_string().into_bytes();","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":219047,"byte_end":219109,"line_start":50,"line_end":50,"column_start":1,"column_end":63}},{"value":"/ bytes.shuffle(&mut rng);","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":219110,"byte_end":219138,"line_start":51,"line_end":51,"column_start":1,"column_end":29}},{"value":"/ let str = String::from_utf8(bytes).unwrap();","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":219139,"byte_end":219187,"line_start":52,"line_end":52,"column_start":1,"column_end":49}},{"value":"/ println!(\"{}\", str);","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":219188,"byte_end":219212,"line_start":53,"line_end":53,"column_start":1,"column_end":25}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":219213,"byte_end":219220,"line_start":54,"line_end":54,"column_start":1,"column_end":8}},{"value":"/ Example output (non-deterministic):","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":219221,"byte_end":219260,"line_start":55,"line_end":55,"column_start":1,"column_end":40}},{"value":"/ ```none","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":219261,"byte_end":219272,"line_start":56,"line_end":56,"column_start":1,"column_end":12}},{"value":"/ l,nmroHado !le","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":219273,"byte_end":219291,"line_start":57,"line_end":57,"column_start":1,"column_end":19}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":219292,"byte_end":219299,"line_start":58,"line_end":58,"column_start":1,"column_end":8}}]},{"kind":"Type","id":{"krate":0,"index":1005},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":219359,"byte_end":219363,"line_start":61,"line_end":61,"column_start":10,"column_end":14},"name":"Item","qualname":"::seq::SliceRandom::Item","value":"type Item;","parent":{"krate":0,"index":1004},"children":[],"decl_id":null,"docs":" The element type.\n","sig":null,"attributes":[{"value":"/ The element type.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":219328,"byte_end":219349,"line_start":60,"line_end":60,"column_start":5,"column_end":26}}]},{"kind":"Method","id":{"krate":0,"index":1006},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":219849,"byte_end":219855,"line_start":79,"line_end":79,"column_start":8,"column_end":14},"name":"choose","qualname":"::seq::SliceRandom::choose","value":"pub fn choose<R>(&Self, &mut R) -> Option<&Self::Item> where R: Rng + ?Sized","parent":{"krate":0,"index":1004},"children":[],"decl_id":null,"docs":" Returns a reference to one random element of the slice, or `None` if the\n slice is empty.","sig":null,"attributes":[{"value":"/ Returns a reference to one random element of the slice, or `None` if the","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":219370,"byte_end":219446,"line_start":63,"line_end":63,"column_start":5,"column_end":81}},{"value":"/ slice is empty.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":219451,"byte_end":219470,"line_start":64,"line_end":64,"column_start":5,"column_end":24}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":219475,"byte_end":219478,"line_start":65,"line_end":65,"column_start":5,"column_end":8}},{"value":"/ For slices, complexity is `O(1)`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":219483,"byte_end":219520,"line_start":66,"line_end":66,"column_start":5,"column_end":42}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":219525,"byte_end":219528,"line_start":67,"line_end":67,"column_start":5,"column_end":8}},{"value":"/ # Example","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":219533,"byte_end":219546,"line_start":68,"line_end":68,"column_start":5,"column_end":18}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":219551,"byte_end":219554,"line_start":69,"line_end":69,"column_start":5,"column_end":8}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":219559,"byte_end":219566,"line_start":70,"line_end":70,"column_start":5,"column_end":12}},{"value":"/ use rand::thread_rng;","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":219571,"byte_end":219596,"line_start":71,"line_end":71,"column_start":5,"column_end":30}},{"value":"/ use rand::seq::SliceRandom;","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":219601,"byte_end":219632,"line_start":72,"line_end":72,"column_start":5,"column_end":36}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":219637,"byte_end":219640,"line_start":73,"line_end":73,"column_start":5,"column_end":8}},{"value":"/ let choices = [1, 2, 4, 8, 16, 32];","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":219645,"byte_end":219684,"line_start":74,"line_end":74,"column_start":5,"column_end":44}},{"value":"/ let mut rng = thread_rng();","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":219689,"byte_end":219720,"line_start":75,"line_end":75,"column_start":5,"column_end":36}},{"value":"/ println!(\"{:?}\", choices.choose(&mut rng));","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":219725,"byte_end":219772,"line_start":76,"line_end":76,"column_start":5,"column_end":52}},{"value":"/ assert_eq!(choices[..0].choose(&mut rng), None);","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":219777,"byte_end":219829,"line_start":77,"line_end":77,"column_start":5,"column_end":57}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":219834,"byte_end":219841,"line_start":78,"line_end":78,"column_start":5,"column_end":12}}]},{"kind":"Method","id":{"krate":0,"index":1008},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":220100,"byte_end":220110,"line_start":86,"line_end":86,"column_start":8,"column_end":18},"name":"choose_mut","qualname":"::seq::SliceRandom::choose_mut","value":"pub fn choose_mut<R>(&mut Self, &mut R) -> Option<&mut Self::Item> where\nR: Rng + ?Sized","parent":{"krate":0,"index":1004},"children":[],"decl_id":null,"docs":" Returns a mutable reference to one random element of the slice, or\n `None` if the slice is empty.","sig":null,"attributes":[{"value":"/ Returns a mutable reference to one random element of the slice, or","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":219934,"byte_end":220004,"line_start":82,"line_end":82,"column_start":5,"column_end":75}},{"value":"/ `None` if the slice is empty.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":220009,"byte_end":220042,"line_start":83,"line_end":83,"column_start":5,"column_end":38}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":220047,"byte_end":220050,"line_start":84,"line_end":84,"column_start":5,"column_end":8}},{"value":"/ For slices, complexity is `O(1)`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":220055,"byte_end":220092,"line_start":85,"line_end":85,"column_start":5,"column_end":42}}]},{"kind":"Method","id":{"krate":0,"index":1010},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":221199,"byte_end":221214,"line_start":115,"line_end":115,"column_start":8,"column_end":23},"name":"choose_multiple","qualname":"::seq::SliceRandom::choose_multiple","value":"pub fn choose_multiple<R>(&Self, &mut R, usize)\n-> SliceChooseIter<, Self, Self::Item> where R: Rng + ?Sized","parent":{"krate":0,"index":1004},"children":[],"decl_id":null,"docs":" Chooses `amount` elements from the slice at random, without repetition,\n and in random order. The returned iterator is appropriate both for\n collection into a `Vec` and filling an existing buffer (see example).","sig":null,"attributes":[{"value":"/ Chooses `amount` elements from the slice at random, without repetition,","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":220197,"byte_end":220272,"line_start":89,"line_end":89,"column_start":5,"column_end":80}},{"value":"/ and in random order. The returned iterator is appropriate both for","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":220277,"byte_end":220347,"line_start":90,"line_end":90,"column_start":5,"column_end":75}},{"value":"/ collection into a `Vec` and filling an existing buffer (see example).","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":220352,"byte_end":220425,"line_start":91,"line_end":91,"column_start":5,"column_end":78}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":220430,"byte_end":220433,"line_start":92,"line_end":92,"column_start":5,"column_end":8}},{"value":"/ In case this API is not sufficiently flexible, use [`index::sample`].","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":220438,"byte_end":220511,"line_start":93,"line_end":93,"column_start":5,"column_end":78}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":220516,"byte_end":220519,"line_start":94,"line_end":94,"column_start":5,"column_end":8}},{"value":"/ For slices, complexity is the same as [`index::sample`].","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":220524,"byte_end":220584,"line_start":95,"line_end":95,"column_start":5,"column_end":65}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":220589,"byte_end":220592,"line_start":96,"line_end":96,"column_start":5,"column_end":8}},{"value":"/ # Example","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":220597,"byte_end":220610,"line_start":97,"line_end":97,"column_start":5,"column_end":18}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":220615,"byte_end":220622,"line_start":98,"line_end":98,"column_start":5,"column_end":12}},{"value":"/ use rand::seq::SliceRandom;","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":220627,"byte_end":220658,"line_start":99,"line_end":99,"column_start":5,"column_end":36}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":220663,"byte_end":220666,"line_start":100,"line_end":100,"column_start":5,"column_end":8}},{"value":"/ let mut rng = &mut rand::thread_rng();","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":220671,"byte_end":220713,"line_start":101,"line_end":101,"column_start":5,"column_end":47}},{"value":"/ let sample = \"Hello, audience!\".as_bytes();","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":220718,"byte_end":220765,"line_start":102,"line_end":102,"column_start":5,"column_end":52}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":220770,"byte_end":220773,"line_start":103,"line_end":103,"column_start":5,"column_end":8}},{"value":"/ // collect the results into a vector:","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":220778,"byte_end":220819,"line_start":104,"line_end":104,"column_start":5,"column_end":46}},{"value":"/ let v: Vec<u8> = sample.choose_multiple(&mut rng, 3).cloned().collect();","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":220824,"byte_end":220900,"line_start":105,"line_end":105,"column_start":5,"column_end":81}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":220905,"byte_end":220908,"line_start":106,"line_end":106,"column_start":5,"column_end":8}},{"value":"/ // store in a buffer:","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":220913,"byte_end":220938,"line_start":107,"line_end":107,"column_start":5,"column_end":30}},{"value":"/ let mut buf = [0u8; 5];","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":220943,"byte_end":220970,"line_start":108,"line_end":108,"column_start":5,"column_end":32}},{"value":"/ for (b, slot) in sample.choose_multiple(&mut rng, buf.len()).zip(buf.iter_mut()) {","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":220975,"byte_end":221061,"line_start":109,"line_end":109,"column_start":5,"column_end":91}},{"value":"/ *slot = *b;","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":221066,"byte_end":221085,"line_start":110,"line_end":110,"column_start":5,"column_end":24}},{"value":"/ }","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":221090,"byte_end":221095,"line_start":111,"line_end":111,"column_start":5,"column_end":10}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":221100,"byte_end":221107,"line_start":112,"line_end":112,"column_start":5,"column_end":12}},{"value":"cfg(feature = \"alloc\")","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":221112,"byte_end":221137,"line_start":113,"line_end":113,"column_start":5,"column_end":30}}]},{"kind":"Method","id":{"krate":0,"index":1012},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":222410,"byte_end":222425,"line_start":143,"line_end":143,"column_start":8,"column_end":23},"name":"choose_weighted","qualname":"::seq::SliceRandom::choose_weighted","value":"pub fn choose_weighted<R, F, B, X>(&Self, &mut R, F)\n-> Result<&Self::Item, WeightedError> where R: Rng + ?Sized,\nF: Fn(&Self::Item) -> B, B: SampleBorrow<X>, X: SampleUniform +\nfor<'a> ::core::ops::AddAssign<&'a X> + ::core::cmp::PartialOrd<X> + Clone +\nDefault","parent":{"krate":0,"index":1004},"children":[],"decl_id":null,"docs":" Similar to [`choose`], but where the likelihood of each outcome may be\n specified.","sig":null,"attributes":[{"value":"/ Similar to [`choose`], but where the likelihood of each outcome may be","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":221322,"byte_end":221396,"line_start":118,"line_end":118,"column_start":5,"column_end":79}},{"value":"/ specified.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":221401,"byte_end":221415,"line_start":119,"line_end":119,"column_start":5,"column_end":19}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":221420,"byte_end":221423,"line_start":120,"line_end":120,"column_start":5,"column_end":8}},{"value":"/ The specified function `weight` maps each item `x` to a relative","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":221428,"byte_end":221496,"line_start":121,"line_end":121,"column_start":5,"column_end":73}},{"value":"/ likelihood `weight(x)`. The probability of each item being selected is","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":221501,"byte_end":221575,"line_start":122,"line_end":122,"column_start":5,"column_end":79}},{"value":"/ therefore `weight(x) / s`, where `s` is the sum of all `weight(x)`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":221580,"byte_end":221651,"line_start":123,"line_end":123,"column_start":5,"column_end":76}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":221656,"byte_end":221659,"line_start":124,"line_end":124,"column_start":5,"column_end":8}},{"value":"/ For slices of length `n`, complexity is `O(n)`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":221664,"byte_end":221715,"line_start":125,"line_end":125,"column_start":5,"column_end":56}},{"value":"/ See also [`choose_weighted_mut`], [`distributions::weighted`].","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":221720,"byte_end":221786,"line_start":126,"line_end":126,"column_start":5,"column_end":71}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":221791,"byte_end":221794,"line_start":127,"line_end":127,"column_start":5,"column_end":8}},{"value":"/ # Example","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":221799,"byte_end":221812,"line_start":128,"line_end":128,"column_start":5,"column_end":18}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":221817,"byte_end":221820,"line_start":129,"line_end":129,"column_start":5,"column_end":8}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":221825,"byte_end":221832,"line_start":130,"line_end":130,"column_start":5,"column_end":12}},{"value":"/ use rand::prelude::*;","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":221837,"byte_end":221862,"line_start":131,"line_end":131,"column_start":5,"column_end":30}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":221867,"byte_end":221870,"line_start":132,"line_end":132,"column_start":5,"column_end":8}},{"value":"/ let choices = [('a', 2), ('b', 1), ('c', 1)];","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":221875,"byte_end":221924,"line_start":133,"line_end":133,"column_start":5,"column_end":54}},{"value":"/ let mut rng = thread_rng();","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":221929,"byte_end":221960,"line_start":134,"line_end":134,"column_start":5,"column_end":36}},{"value":"/ // 50% chance to print 'a', 25% chance to print 'b', 25% chance to print 'c'","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":221965,"byte_end":222045,"line_start":135,"line_end":135,"column_start":5,"column_end":85}},{"value":"/ println!(\"{:?}\", choices.choose_weighted(&mut rng, |item| item.1).unwrap().0);","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":222050,"byte_end":222132,"line_start":136,"line_end":136,"column_start":5,"column_end":87}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":222137,"byte_end":222144,"line_start":137,"line_end":137,"column_start":5,"column_end":12}},{"value":"/ [`choose`]: SliceRandom::choose","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":222149,"byte_end":222184,"line_start":138,"line_end":138,"column_start":5,"column_end":40}},{"value":"/ [`choose_weighted_mut`]: SliceRandom::choose_weighted_mut","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":222189,"byte_end":222250,"line_start":139,"line_end":139,"column_start":5,"column_end":66}},{"value":"/ [`distributions::weighted`]: crate::distributions::weighted","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":222255,"byte_end":222318,"line_start":140,"line_end":140,"column_start":5,"column_end":68}},{"value":"cfg(feature = \"alloc\")","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":222323,"byte_end":222348,"line_start":141,"line_end":141,"column_start":5,"column_end":30}}]},{"kind":"Method","id":{"krate":0,"index":1018},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":223522,"byte_end":223541,"line_start":171,"line_end":171,"column_start":8,"column_end":27},"name":"choose_weighted_mut","qualname":"::seq::SliceRandom::choose_weighted_mut","value":"pub fn choose_weighted_mut<R, F, B, X>(&mut Self, &mut R, F)\n-> Result<&mut Self::Item, WeightedError> where R: Rng + ?Sized,\nF: Fn(&Self::Item) -> B, B: SampleBorrow<X>, X: SampleUniform +\nfor<'a> ::core::ops::AddAssign<&'a X> + ::core::cmp::PartialOrd<X> + Clone +\nDefault","parent":{"krate":0,"index":1004},"children":[],"decl_id":null,"docs":" Similar to [`choose_mut`], but where the likelihood of each outcome may\n be specified.","sig":null,"attributes":[{"value":"/ Similar to [`choose_mut`], but where the likelihood of each outcome may","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":222784,"byte_end":222859,"line_start":156,"line_end":156,"column_start":5,"column_end":80}},{"value":"/ be specified.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":222864,"byte_end":222881,"line_start":157,"line_end":157,"column_start":5,"column_end":22}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":222886,"byte_end":222889,"line_start":158,"line_end":158,"column_start":5,"column_end":8}},{"value":"/ The specified function `weight` maps each item `x` to a relative","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":222894,"byte_end":222962,"line_start":159,"line_end":159,"column_start":5,"column_end":73}},{"value":"/ likelihood `weight(x)`. The probability of each item being selected is","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":222967,"byte_end":223041,"line_start":160,"line_end":160,"column_start":5,"column_end":79}},{"value":"/ therefore `weight(x) / s`, where `s` is the sum of all `weight(x)`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":223046,"byte_end":223117,"line_start":161,"line_end":161,"column_start":5,"column_end":76}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":223122,"byte_end":223125,"line_start":162,"line_end":162,"column_start":5,"column_end":8}},{"value":"/ For slices of length `n`, complexity is `O(n)`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":223130,"byte_end":223181,"line_start":163,"line_end":163,"column_start":5,"column_end":56}},{"value":"/ See also [`choose_weighted`], [`distributions::weighted`].","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":223186,"byte_end":223248,"line_start":164,"line_end":164,"column_start":5,"column_end":67}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":223253,"byte_end":223256,"line_start":165,"line_end":165,"column_start":5,"column_end":8}},{"value":"/ [`choose_mut`]: SliceRandom::choose_mut","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":223261,"byte_end":223304,"line_start":166,"line_end":166,"column_start":5,"column_end":48}},{"value":"/ [`choose_weighted`]: SliceRandom::choose_weighted","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":223309,"byte_end":223362,"line_start":167,"line_end":167,"column_start":5,"column_end":58}},{"value":"/ [`distributions::weighted`]: crate::distributions::weighted","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":223367,"byte_end":223430,"line_start":168,"line_end":168,"column_start":5,"column_end":68}},{"value":"cfg(feature = \"alloc\")","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":223435,"byte_end":223460,"line_start":169,"line_end":169,"column_start":5,"column_end":30}}]},{"kind":"Method","id":{"krate":0,"index":1024},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":225758,"byte_end":225782,"line_start":220,"line_end":220,"column_start":8,"column_end":32},"name":"choose_multiple_weighted","qualname":"::seq::SliceRandom::choose_multiple_weighted","value":"pub fn choose_multiple_weighted<R, F, X>(&Self, &mut R, usize, F)\n-> Result<SliceChooseIter<, Self, Self::Item>, WeightedError> where R: Rng +\n?Sized, F: Fn(&Self::Item) -> X, X: Into<f64>","parent":{"krate":0,"index":1004},"children":[],"decl_id":null,"docs":" Similar to [`choose_multiple`], but where the likelihood of each element's\n inclusion in the output may be specified. The elements are returned in an\n arbitrary, unspecified order.","sig":null,"attributes":[{"value":"/ Similar to [`choose_multiple`], but where the likelihood of each element's","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":223908,"byte_end":223986,"line_start":184,"line_end":184,"column_start":5,"column_end":83}},{"value":"/ inclusion in the output may be specified. The elements are returned in an","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":223991,"byte_end":224068,"line_start":185,"line_end":185,"column_start":5,"column_end":82}},{"value":"/ arbitrary, unspecified order.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":224073,"byte_end":224106,"line_start":186,"line_end":186,"column_start":5,"column_end":38}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":224111,"byte_end":224114,"line_start":187,"line_end":187,"column_start":5,"column_end":8}},{"value":"/ The specified function `weight` maps each item `x` to a relative","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":224119,"byte_end":224187,"line_start":188,"line_end":188,"column_start":5,"column_end":73}},{"value":"/ likelihood `weight(x)`. The probability of each item being selected is","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":224192,"byte_end":224266,"line_start":189,"line_end":189,"column_start":5,"column_end":79}},{"value":"/ therefore `weight(x) / s`, where `s` is the sum of all `weight(x)`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":224271,"byte_end":224342,"line_start":190,"line_end":190,"column_start":5,"column_end":76}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":224347,"byte_end":224350,"line_start":191,"line_end":191,"column_start":5,"column_end":8}},{"value":"/ If all of the weights are equal, even if they are all zero, each element has","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":224355,"byte_end":224435,"line_start":192,"line_end":192,"column_start":5,"column_end":85}},{"value":"/ an equal likelihood of being selected.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":224440,"byte_end":224482,"line_start":193,"line_end":193,"column_start":5,"column_end":47}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":224487,"byte_end":224490,"line_start":194,"line_end":194,"column_start":5,"column_end":8}},{"value":"/ The complexity of this method depends on the feature `partition_at_index`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":224495,"byte_end":224573,"line_start":195,"line_end":195,"column_start":5,"column_end":83}},{"value":"/ If the feature is enabled, then for slices of length `n`, the complexity","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":224578,"byte_end":224654,"line_start":196,"line_end":196,"column_start":5,"column_end":81}},{"value":"/ is `O(n)` space and `O(n)` time. Otherwise, the complexity is `O(n)` space and","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":224659,"byte_end":224741,"line_start":197,"line_end":197,"column_start":5,"column_end":87}},{"value":"/ `O(n * log amount)` time.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":224746,"byte_end":224775,"line_start":198,"line_end":198,"column_start":5,"column_end":34}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":224780,"byte_end":224783,"line_start":199,"line_end":199,"column_start":5,"column_end":8}},{"value":"/ # Example","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":224788,"byte_end":224801,"line_start":200,"line_end":200,"column_start":5,"column_end":18}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":224806,"byte_end":224809,"line_start":201,"line_end":201,"column_start":5,"column_end":8}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":224814,"byte_end":224821,"line_start":202,"line_end":202,"column_start":5,"column_end":12}},{"value":"/ use rand::prelude::*;","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":224826,"byte_end":224851,"line_start":203,"line_end":203,"column_start":5,"column_end":30}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":224856,"byte_end":224859,"line_start":204,"line_end":204,"column_start":5,"column_end":8}},{"value":"/ let choices = [('a', 2), ('b', 1), ('c', 1)];","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":224864,"byte_end":224913,"line_start":205,"line_end":205,"column_start":5,"column_end":54}},{"value":"/ let mut rng = thread_rng();","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":224918,"byte_end":224949,"line_start":206,"line_end":206,"column_start":5,"column_end":36}},{"value":"/ // First Draw * Second Draw = total odds","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":224954,"byte_end":224998,"line_start":207,"line_end":207,"column_start":5,"column_end":49}},{"value":"/ // -----------------------","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":225003,"byte_end":225033,"line_start":208,"line_end":208,"column_start":5,"column_end":35}},{"value":"/ // (50% * 50%) + (25% * 67%) = 41.7% chance that the output is `['a', 'b']` in some order.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":225038,"byte_end":225132,"line_start":209,"line_end":209,"column_start":5,"column_end":99}},{"value":"/ // (50% * 50%) + (25% * 67%) = 41.7% chance that the output is `['a', 'c']` in some order.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":225137,"byte_end":225231,"line_start":210,"line_end":210,"column_start":5,"column_end":99}},{"value":"/ // (25% * 33%) + (25% * 33%) = 16.6% chance that the output is `['b', 'c']` in some order.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":225236,"byte_end":225330,"line_start":211,"line_end":211,"column_start":5,"column_end":99}},{"value":"/ println!(\"{:?}\", choices.choose_multiple_weighted(&mut rng, 2, |item| item.1).unwrap().collect::<Vec<_>>());","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":225335,"byte_end":225447,"line_start":212,"line_end":212,"column_start":5,"column_end":117}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":225452,"byte_end":225459,"line_start":213,"line_end":213,"column_start":5,"column_end":12}},{"value":"/ [`choose_multiple`]: SliceRandom::choose_multiple","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":225464,"byte_end":225517,"line_start":214,"line_end":214,"column_start":5,"column_end":58}},{"value":"cfg(feature = \"std\")","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":225675,"byte_end":225698,"line_start":218,"line_end":218,"column_start":5,"column_end":28}}]},{"kind":"Method","id":{"krate":0,"index":1028},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":226433,"byte_end":226440,"line_start":244,"line_end":244,"column_start":8,"column_end":15},"name":"shuffle","qualname":"::seq::SliceRandom::shuffle","value":"pub fn shuffle<R>(&mut Self, &mut R) where R: Rng + ?Sized","parent":{"krate":0,"index":1004},"children":[],"decl_id":null,"docs":" Shuffle a mutable slice in place.","sig":null,"attributes":[{"value":"/ Shuffle a mutable slice in place.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":226008,"byte_end":226045,"line_start":228,"line_end":228,"column_start":5,"column_end":42}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":226050,"byte_end":226053,"line_start":229,"line_end":229,"column_start":5,"column_end":8}},{"value":"/ For slices of length `n`, complexity is `O(n)`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":226058,"byte_end":226109,"line_start":230,"line_end":230,"column_start":5,"column_end":56}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":226114,"byte_end":226117,"line_start":231,"line_end":231,"column_start":5,"column_end":8}},{"value":"/ # Example","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":226122,"byte_end":226135,"line_start":232,"line_end":232,"column_start":5,"column_end":18}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":226140,"byte_end":226143,"line_start":233,"line_end":233,"column_start":5,"column_end":8}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":226148,"byte_end":226155,"line_start":234,"line_end":234,"column_start":5,"column_end":12}},{"value":"/ use rand::seq::SliceRandom;","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":226160,"byte_end":226191,"line_start":235,"line_end":235,"column_start":5,"column_end":36}},{"value":"/ use rand::thread_rng;","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":226196,"byte_end":226221,"line_start":236,"line_end":236,"column_start":5,"column_end":30}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":226226,"byte_end":226229,"line_start":237,"line_end":237,"column_start":5,"column_end":8}},{"value":"/ let mut rng = thread_rng();","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":226234,"byte_end":226265,"line_start":238,"line_end":238,"column_start":5,"column_end":36}},{"value":"/ let mut y = [1, 2, 3, 4, 5];","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":226270,"byte_end":226302,"line_start":239,"line_end":239,"column_start":5,"column_end":37}},{"value":"/ println!(\"Unshuffled: {:?}\", y);","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":226307,"byte_end":226343,"line_start":240,"line_end":240,"column_start":5,"column_end":41}},{"value":"/ y.shuffle(&mut rng);","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":226348,"byte_end":226372,"line_start":241,"line_end":241,"column_start":5,"column_end":29}},{"value":"/ println!(\"Shuffled: {:?}\", y);","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":226377,"byte_end":226413,"line_start":242,"line_end":242,"column_start":5,"column_end":41}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":226418,"byte_end":226425,"line_start":243,"line_end":243,"column_start":5,"column_end":12}}]},{"kind":"Method","id":{"krate":0,"index":1030},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":227305,"byte_end":227320,"line_start":264,"line_end":264,"column_start":8,"column_end":23},"name":"partial_shuffle","qualname":"::seq::SliceRandom::partial_shuffle","value":"pub fn partial_shuffle<R>(&mut Self, &mut R, usize)\n-> (&mut [Self::Item], &mut [Self::Item]) where R: Rng + ?Sized","parent":{"krate":0,"index":1004},"children":[],"decl_id":null,"docs":" Shuffle a slice in place, but exit early.","sig":null,"attributes":[{"value":"/ Shuffle a slice in place, but exit early.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":226500,"byte_end":226545,"line_start":247,"line_end":247,"column_start":5,"column_end":50}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":226550,"byte_end":226553,"line_start":248,"line_end":248,"column_start":5,"column_end":8}},{"value":"/ Returns two mutable slices from the source slice. The first contains","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":226558,"byte_end":226630,"line_start":249,"line_end":249,"column_start":5,"column_end":77}},{"value":"/ `amount` elements randomly permuted. The second has the remaining","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":226635,"byte_end":226704,"line_start":250,"line_end":250,"column_start":5,"column_end":74}},{"value":"/ elements that are not fully shuffled.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":226709,"byte_end":226750,"line_start":251,"line_end":251,"column_start":5,"column_end":46}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":226755,"byte_end":226758,"line_start":252,"line_end":252,"column_start":5,"column_end":8}},{"value":"/ This is an efficient method to select `amount` elements at random from","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":226763,"byte_end":226837,"line_start":253,"line_end":253,"column_start":5,"column_end":79}},{"value":"/ the slice, provided the slice may be mutated.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":226842,"byte_end":226891,"line_start":254,"line_end":254,"column_start":5,"column_end":54}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":226896,"byte_end":226899,"line_start":255,"line_end":255,"column_start":5,"column_end":8}},{"value":"/ If you only need to choose elements randomly and `amount > self.len()/2`","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":226904,"byte_end":226980,"line_start":256,"line_end":256,"column_start":5,"column_end":81}},{"value":"/ then you may improve performance by taking","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":226985,"byte_end":227031,"line_start":257,"line_end":257,"column_start":5,"column_end":51}},{"value":"/ `amount = values.len() - amount` and using only the second slice.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":227036,"byte_end":227105,"line_start":258,"line_end":258,"column_start":5,"column_end":74}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":227110,"byte_end":227113,"line_start":259,"line_end":259,"column_start":5,"column_end":8}},{"value":"/ If `amount` is greater than the number of elements in the slice, this","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":227118,"byte_end":227191,"line_start":260,"line_end":260,"column_start":5,"column_end":78}},{"value":"/ will perform a full shuffle.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":227196,"byte_end":227228,"line_start":261,"line_end":261,"column_start":5,"column_end":37}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":227233,"byte_end":227236,"line_start":262,"line_end":262,"column_start":5,"column_end":8}},{"value":"/ For slices, complexity is `O(m)` where `m = amount`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":227241,"byte_end":227297,"line_start":263,"line_end":263,"column_start":5,"column_end":61}}]},{"kind":"Trait","id":{"krate":0,"index":1032},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":227990,"byte_end":228004,"line_start":288,"line_end":288,"column_start":11,"column_end":25},"name":"IteratorRandom","qualname":"::seq::IteratorRandom","value":"IteratorRandom: Iterator + Sized","parent":null,"children":[{"krate":0,"index":1033},{"krate":0,"index":1035},{"krate":0,"index":1038},{"krate":0,"index":1040}],"decl_id":null,"docs":" Extension trait on iterators, providing random sampling methods.","sig":null,"attributes":[{"value":"/ Extension trait on iterators, providing random sampling methods.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":227450,"byte_end":227518,"line_start":270,"line_end":270,"column_start":1,"column_end":69}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":227519,"byte_end":227522,"line_start":271,"line_end":271,"column_start":1,"column_end":4}},{"value":"/ This trait is implemented on all iterators `I` where `I: Iterator + Sized`","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":227523,"byte_end":227601,"line_start":272,"line_end":272,"column_start":1,"column_end":79}},{"value":"/ and provides methods for","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":227602,"byte_end":227630,"line_start":273,"line_end":273,"column_start":1,"column_end":29}},{"value":"/ choosing one or more elements. You must `use` this trait:","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":227631,"byte_end":227692,"line_start":274,"line_end":274,"column_start":1,"column_end":62}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":227693,"byte_end":227696,"line_start":275,"line_end":275,"column_start":1,"column_end":4}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":227697,"byte_end":227704,"line_start":276,"line_end":276,"column_start":1,"column_end":8}},{"value":"/ use rand::seq::IteratorRandom;","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":227705,"byte_end":227739,"line_start":277,"line_end":277,"column_start":1,"column_end":35}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":227740,"byte_end":227743,"line_start":278,"line_end":278,"column_start":1,"column_end":4}},{"value":"/ let mut rng = rand::thread_rng();","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":227744,"byte_end":227781,"line_start":279,"line_end":279,"column_start":1,"column_end":38}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":227782,"byte_end":227785,"line_start":280,"line_end":280,"column_start":1,"column_end":4}},{"value":"/ let faces = \"😀😎😐😕😠😢\";","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":227786,"byte_end":227829,"line_start":281,"line_end":281,"column_start":1,"column_end":26}},{"value":"/ println!(\"I am {}!\", faces.chars().choose(&mut rng).unwrap());","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":227830,"byte_end":227896,"line_start":282,"line_end":282,"column_start":1,"column_end":67}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":227897,"byte_end":227904,"line_start":283,"line_end":283,"column_start":1,"column_end":8}},{"value":"/ Example output (non-deterministic):","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":227905,"byte_end":227944,"line_start":284,"line_end":284,"column_start":1,"column_end":40}},{"value":"/ ```none","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":227945,"byte_end":227956,"line_start":285,"line_end":285,"column_start":1,"column_end":12}},{"value":"/ I am 😀!","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":227957,"byte_end":227971,"line_start":286,"line_end":286,"column_start":1,"column_end":12}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":227972,"byte_end":227979,"line_start":287,"line_end":287,"column_start":1,"column_end":8}}]},{"kind":"Method","id":{"krate":0,"index":1033},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":228916,"byte_end":228922,"line_start":304,"line_end":304,"column_start":8,"column_end":14},"name":"choose","qualname":"::seq::IteratorRandom::choose","value":"pub fn choose<R>(Self, &mut R) -> Option<Self::Item> where R: Rng + ?Sized","parent":{"krate":0,"index":1032},"children":[],"decl_id":null,"docs":" Choose one element at random from the iterator.","sig":null,"attributes":[{"value":"/ Choose one element at random from the iterator.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":228029,"byte_end":228080,"line_start":289,"line_end":289,"column_start":5,"column_end":56}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":228085,"byte_end":228088,"line_start":290,"line_end":290,"column_start":5,"column_end":8}},{"value":"/ Returns `None` if and only if the iterator is empty.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":228093,"byte_end":228149,"line_start":291,"line_end":291,"column_start":5,"column_end":61}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":228154,"byte_end":228157,"line_start":292,"line_end":292,"column_start":5,"column_end":8}},{"value":"/ This method uses [`Iterator::size_hint`] for optimisation. With an","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":228162,"byte_end":228232,"line_start":293,"line_end":293,"column_start":5,"column_end":75}},{"value":"/ accurate hint and where [`Iterator::nth`] is a constant-time operation","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":228237,"byte_end":228311,"line_start":294,"line_end":294,"column_start":5,"column_end":79}},{"value":"/ this method can offer `O(1)` performance. Where no size hint is","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":228316,"byte_end":228383,"line_start":295,"line_end":295,"column_start":5,"column_end":72}},{"value":"/ available, complexity is `O(n)` where `n` is the iterator length.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":228388,"byte_end":228457,"line_start":296,"line_end":296,"column_start":5,"column_end":74}},{"value":"/ Partial hints (where `lower > 0`) also improve performance.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":228462,"byte_end":228525,"line_start":297,"line_end":297,"column_start":5,"column_end":68}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":228530,"byte_end":228533,"line_start":298,"line_end":298,"column_start":5,"column_end":8}},{"value":"/ Note that the output values and the number of RNG samples used","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":228538,"byte_end":228604,"line_start":299,"line_end":299,"column_start":5,"column_end":71}},{"value":"/ depends on size hints. In particular, `Iterator` combinators that don't","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":228609,"byte_end":228684,"line_start":300,"line_end":300,"column_start":5,"column_end":80}},{"value":"/ change the values yielded but change the size hints may result in","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":228689,"byte_end":228758,"line_start":301,"line_end":301,"column_start":5,"column_end":74}},{"value":"/ `choose` returning different elements. If you want consistent results","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":228763,"byte_end":228836,"line_start":302,"line_end":302,"column_start":5,"column_end":78}},{"value":"/ and RNG usage consider using [`IteratorRandom::choose_stable`].","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":228841,"byte_end":228908,"line_start":303,"line_end":303,"column_start":5,"column_end":72}}]},{"kind":"Method","id":{"krate":0,"index":1035},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":231551,"byte_end":231564,"line_start":373,"line_end":373,"column_start":8,"column_end":21},"name":"choose_stable","qualname":"::seq::IteratorRandom::choose_stable","value":"pub fn choose_stable<R>(Self, &mut R) -> Option<Self::Item> where R: Rng +\n?Sized","parent":{"krate":0,"index":1032},"children":[],"decl_id":null,"docs":" Choose one element at random from the iterator.","sig":null,"attributes":[{"value":"/ Choose one element at random from the iterator.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":230518,"byte_end":230569,"line_start":355,"line_end":355,"column_start":5,"column_end":56}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":230574,"byte_end":230577,"line_start":356,"line_end":356,"column_start":5,"column_end":8}},{"value":"/ Returns `None` if and only if the iterator is empty.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":230582,"byte_end":230638,"line_start":357,"line_end":357,"column_start":5,"column_end":61}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":230643,"byte_end":230646,"line_start":358,"line_end":358,"column_start":5,"column_end":8}},{"value":"/ This method is very similar to [`choose`] except that the result","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":230651,"byte_end":230719,"line_start":359,"line_end":359,"column_start":5,"column_end":73}},{"value":"/ only depends on the length of the iterator and the values produced by","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":230724,"byte_end":230797,"line_start":360,"line_end":360,"column_start":5,"column_end":78}},{"value":"/ `rng`. Notably for any iterator of a given length this will make the","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":230802,"byte_end":230874,"line_start":361,"line_end":361,"column_start":5,"column_end":77}},{"value":"/ same requests to `rng` and if the same sequence of values are produced","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":230879,"byte_end":230953,"line_start":362,"line_end":362,"column_start":5,"column_end":79}},{"value":"/ the same index will be selected from `self`. This may be useful if you","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":230958,"byte_end":231032,"line_start":363,"line_end":363,"column_start":5,"column_end":79}},{"value":"/ need consistent results no matter what type of iterator you are working","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":231037,"byte_end":231112,"line_start":364,"line_end":364,"column_start":5,"column_end":80}},{"value":"/ with. If you do not need this stability prefer [`choose`].","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":231117,"byte_end":231179,"line_start":365,"line_end":365,"column_start":5,"column_end":67}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":231184,"byte_end":231187,"line_start":366,"line_end":366,"column_start":5,"column_end":8}},{"value":"/ Note that this method still uses [`Iterator::size_hint`] to skip","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":231192,"byte_end":231260,"line_start":367,"line_end":367,"column_start":5,"column_end":73}},{"value":"/ constructing elements where possible, however the selection and `rng`","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":231265,"byte_end":231338,"line_start":368,"line_end":368,"column_start":5,"column_end":78}},{"value":"/ calls are the same in the face of this optimization. If you want to","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":231343,"byte_end":231414,"line_start":369,"line_end":369,"column_start":5,"column_end":76}},{"value":"/ force every element to be created regardless call `.inspect(|e| ())`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":231419,"byte_end":231492,"line_start":370,"line_end":370,"column_start":5,"column_end":78}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":231497,"byte_end":231500,"line_start":371,"line_end":371,"column_start":5,"column_end":8}},{"value":"/ [`choose`]: IteratorRandom::choose","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":231505,"byte_end":231543,"line_start":372,"line_end":372,"column_start":5,"column_end":43}}]},{"kind":"Method","id":{"krate":0,"index":1038},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":233513,"byte_end":233533,"line_start":426,"line_end":426,"column_start":8,"column_end":28},"name":"choose_multiple_fill","qualname":"::seq::IteratorRandom::choose_multiple_fill","value":"pub fn choose_multiple_fill<R>(Self, &mut R, &mut [Self::Item]) -> usize where\nR: Rng + ?Sized","parent":{"krate":0,"index":1032},"children":[],"decl_id":null,"docs":" Collects values at random from the iterator into a supplied buffer\n until that buffer is filled.","sig":null,"attributes":[{"value":"/ Collects values at random from the iterator into a supplied buffer","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":232826,"byte_end":232896,"line_start":413,"line_end":413,"column_start":5,"column_end":75}},{"value":"/ until that buffer is filled.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":232901,"byte_end":232933,"line_start":414,"line_end":414,"column_start":5,"column_end":37}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":232938,"byte_end":232941,"line_start":415,"line_end":415,"column_start":5,"column_end":8}},{"value":"/ Although the elements are selected randomly, the order of elements in","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":232946,"byte_end":233019,"line_start":416,"line_end":416,"column_start":5,"column_end":78}},{"value":"/ the buffer is neither stable nor fully random. If random ordering is","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":233024,"byte_end":233096,"line_start":417,"line_end":417,"column_start":5,"column_end":77}},{"value":"/ desired, shuffle the result.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":233101,"byte_end":233133,"line_start":418,"line_end":418,"column_start":5,"column_end":37}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":233138,"byte_end":233141,"line_start":419,"line_end":419,"column_start":5,"column_end":8}},{"value":"/ Returns the number of elements added to the buffer. This equals the length","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":233146,"byte_end":233224,"line_start":420,"line_end":420,"column_start":5,"column_end":83}},{"value":"/ of the buffer unless the iterator contains insufficient elements, in which","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":233229,"byte_end":233307,"line_start":421,"line_end":421,"column_start":5,"column_end":83}},{"value":"/ case this equals the number of elements available.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":233312,"byte_end":233366,"line_start":422,"line_end":422,"column_start":5,"column_end":59}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":233371,"byte_end":233374,"line_start":423,"line_end":423,"column_start":5,"column_end":8}},{"value":"/ Complexity is `O(n)` where `n` is the length of the iterator.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":233379,"byte_end":233444,"line_start":424,"line_end":424,"column_start":5,"column_end":70}},{"value":"/ For slices, prefer [`SliceRandom::choose_multiple`].","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":233449,"byte_end":233505,"line_start":425,"line_end":425,"column_start":5,"column_end":61}}]},{"kind":"Method","id":{"krate":0,"index":1040},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":234999,"byte_end":235014,"line_start":466,"line_end":466,"column_start":8,"column_end":23},"name":"choose_multiple","qualname":"::seq::IteratorRandom::choose_multiple","value":"pub fn choose_multiple<R>(Self, &mut R, usize) -> Vec<Self::Item> where\nR: Rng + ?Sized","parent":{"krate":0,"index":1032},"children":[],"decl_id":null,"docs":" Collects `amount` values at random from the iterator into a vector.","sig":null,"attributes":[{"value":"/ Collects `amount` values at random from the iterator into a vector.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":234216,"byte_end":234287,"line_start":450,"line_end":450,"column_start":5,"column_end":76}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":234292,"byte_end":234295,"line_start":451,"line_end":451,"column_start":5,"column_end":8}},{"value":"/ This is equivalent to `choose_multiple_fill` except for the result type.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":234300,"byte_end":234376,"line_start":452,"line_end":452,"column_start":5,"column_end":81}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":234381,"byte_end":234384,"line_start":453,"line_end":453,"column_start":5,"column_end":8}},{"value":"/ Although the elements are selected randomly, the order of elements in","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":234389,"byte_end":234462,"line_start":454,"line_end":454,"column_start":5,"column_end":78}},{"value":"/ the buffer is neither stable nor fully random. If random ordering is","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":234467,"byte_end":234539,"line_start":455,"line_end":455,"column_start":5,"column_end":77}},{"value":"/ desired, shuffle the result.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":234544,"byte_end":234576,"line_start":456,"line_end":456,"column_start":5,"column_end":37}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":234581,"byte_end":234584,"line_start":457,"line_end":457,"column_start":5,"column_end":8}},{"value":"/ The length of the returned vector equals `amount` unless the iterator","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":234589,"byte_end":234662,"line_start":458,"line_end":458,"column_start":5,"column_end":78}},{"value":"/ contains insufficient elements, in which case it equals the number of","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":234667,"byte_end":234740,"line_start":459,"line_end":459,"column_start":5,"column_end":78}},{"value":"/ elements available.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":234745,"byte_end":234768,"line_start":460,"line_end":460,"column_start":5,"column_end":28}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":234773,"byte_end":234776,"line_start":461,"line_end":461,"column_start":5,"column_end":8}},{"value":"/ Complexity is `O(n)` where `n` is the length of the iterator.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":234781,"byte_end":234846,"line_start":462,"line_end":462,"column_start":5,"column_end":70}},{"value":"/ For slices, prefer [`SliceRandom::choose_multiple`].","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":234851,"byte_end":234907,"line_start":463,"line_end":463,"column_start":5,"column_end":61}},{"value":"cfg(feature = \"alloc\")","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":234912,"byte_end":234937,"line_start":464,"line_end":464,"column_start":5,"column_end":30}}]},{"kind":"Struct","id":{"krate":0,"index":2449},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":240038,"byte_end":240053,"line_start":625,"line_end":625,"column_start":12,"column_end":27},"name":"SliceChooseIter","qualname":"::seq::SliceChooseIter","value":"SliceChooseIter { }","parent":null,"children":[{"krate":0,"index":2453},{"krate":0,"index":2454},{"krate":0,"index":2455}],"decl_id":null,"docs":" An iterator over multiple slice elements.","sig":null,"attributes":[{"value":"/ An iterator over multiple slice elements.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":239767,"byte_end":239812,"line_start":618,"line_end":618,"column_start":1,"column_end":46}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":239813,"byte_end":239816,"line_start":619,"line_end":619,"column_start":1,"column_end":4}},{"value":"/ This struct is created by","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":239817,"byte_end":239846,"line_start":620,"line_end":620,"column_start":1,"column_end":30}},{"value":"/ [`SliceRandom::choose_multiple`](trait.SliceRandom.html#tymethod.choose_multiple).","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":239847,"byte_end":239933,"line_start":621,"line_end":621,"column_start":1,"column_end":87}},{"value":"cfg(feature = \"alloc\")","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":239934,"byte_end":239959,"line_start":622,"line_end":622,"column_start":1,"column_end":26}}]},{"kind":"Function","id":{"krate":0,"index":1120},"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":5726,"byte_end":5732,"line_start":183,"line_end":183,"column_start":8,"column_end":14},"name":"random","qualname":"::random","value":"pub fn random<T>() -> T where Standard: Distribution<T>","parent":null,"children":[],"decl_id":null,"docs":" Generates a random value using the thread-local random number generator.","sig":null,"attributes":[{"value":"/ Generates a random value using the thread-local random number generator.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":3167,"byte_end":3243,"line_start":111,"line_end":111,"column_start":1,"column_end":77}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":3244,"byte_end":3247,"line_start":112,"line_end":112,"column_start":1,"column_end":4}},{"value":"/ This is simply a shortcut for `thread_rng().gen()`. See [`thread_rng`] for","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":3248,"byte_end":3326,"line_start":113,"line_end":113,"column_start":1,"column_end":79}},{"value":"/ documentation of the entropy source and [`Standard`] for documentation of","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":3327,"byte_end":3404,"line_start":114,"line_end":114,"column_start":1,"column_end":78}},{"value":"/ distributions and type-specific generation.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":3405,"byte_end":3452,"line_start":115,"line_end":115,"column_start":1,"column_end":48}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":3453,"byte_end":3456,"line_start":116,"line_end":116,"column_start":1,"column_end":4}},{"value":"/ # Provided implementations","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":3457,"byte_end":3487,"line_start":117,"line_end":117,"column_start":1,"column_end":31}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":3488,"byte_end":3491,"line_start":118,"line_end":118,"column_start":1,"column_end":4}},{"value":"/ The following types have provided implementations that","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":3492,"byte_end":3550,"line_start":119,"line_end":119,"column_start":1,"column_end":59}},{"value":"/ generate values with the following ranges and distributions:","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":3551,"byte_end":3615,"line_start":120,"line_end":120,"column_start":1,"column_end":65}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":3616,"byte_end":3619,"line_start":121,"line_end":121,"column_start":1,"column_end":4}},{"value":"/ * Integers (`i32`, `u32`, `isize`, `usize`, etc.): Uniformly distributed","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":3620,"byte_end":3696,"line_start":122,"line_end":122,"column_start":1,"column_end":77}},{"value":"/ over all values of the type.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":3697,"byte_end":3731,"line_start":123,"line_end":123,"column_start":1,"column_end":35}},{"value":"/ * `char`: Uniformly distributed over all Unicode scalar values, i.e. all","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":3732,"byte_end":3808,"line_start":124,"line_end":124,"column_start":1,"column_end":77}},{"value":"/ code points in the range `0...0x10_FFFF`, except for the range","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":3809,"byte_end":3877,"line_start":125,"line_end":125,"column_start":1,"column_end":69}},{"value":"/ `0xD800...0xDFFF` (the surrogate code points). This includes","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":3878,"byte_end":3944,"line_start":126,"line_end":126,"column_start":1,"column_end":67}},{"value":"/ unassigned/reserved code points.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":3945,"byte_end":3983,"line_start":127,"line_end":127,"column_start":1,"column_end":39}},{"value":"/ * `bool`: Generates `false` or `true`, each with probability 0.5.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":3984,"byte_end":4053,"line_start":128,"line_end":128,"column_start":1,"column_end":70}},{"value":"/ * Floating point types (`f32` and `f64`): Uniformly distributed in the","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":4054,"byte_end":4128,"line_start":129,"line_end":129,"column_start":1,"column_end":75}},{"value":"/ half-open range `[0, 1)`. See notes below.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":4129,"byte_end":4177,"line_start":130,"line_end":130,"column_start":1,"column_end":49}},{"value":"/ * Wrapping integers (`Wrapping<T>`), besides the type identical to their","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":4178,"byte_end":4254,"line_start":131,"line_end":131,"column_start":1,"column_end":77}},{"value":"/ normal integer variants.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":4255,"byte_end":4285,"line_start":132,"line_end":132,"column_start":1,"column_end":31}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":4286,"byte_end":4289,"line_start":133,"line_end":133,"column_start":1,"column_end":4}},{"value":"/ Also supported is the generation of the following","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":4290,"byte_end":4343,"line_start":134,"line_end":134,"column_start":1,"column_end":54}},{"value":"/ compound types where all component types are supported:","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":4344,"byte_end":4403,"line_start":135,"line_end":135,"column_start":1,"column_end":60}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":4404,"byte_end":4407,"line_start":136,"line_end":136,"column_start":1,"column_end":4}},{"value":"/ * Tuples (up to 12 elements): each element is generated sequentially.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":4408,"byte_end":4483,"line_start":137,"line_end":137,"column_start":1,"column_end":76}},{"value":"/ * Arrays (up to 32 elements): each element is generated sequentially;","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":4484,"byte_end":4559,"line_start":138,"line_end":138,"column_start":1,"column_end":76}},{"value":"/ see also [`Rng::fill`] which supports arbitrary array length for integer","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":4560,"byte_end":4640,"line_start":139,"line_end":139,"column_start":1,"column_end":81}},{"value":"/ types and tends to be faster for `u32` and smaller types.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":4641,"byte_end":4706,"line_start":140,"line_end":140,"column_start":1,"column_end":66}},{"value":"/ * `Option<T>` first generates a `bool`, and if true generates and returns","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":4707,"byte_end":4786,"line_start":141,"line_end":141,"column_start":1,"column_end":80}},{"value":"/ `Some(value)` where `value: T`, otherwise returning `None`.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":4787,"byte_end":4854,"line_start":142,"line_end":142,"column_start":1,"column_end":68}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":4855,"byte_end":4858,"line_start":143,"line_end":143,"column_start":1,"column_end":4}},{"value":"/ # Examples","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":4859,"byte_end":4873,"line_start":144,"line_end":144,"column_start":1,"column_end":15}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":4874,"byte_end":4877,"line_start":145,"line_end":145,"column_start":1,"column_end":4}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":4878,"byte_end":4885,"line_start":146,"line_end":146,"column_start":1,"column_end":8}},{"value":"/ let x = rand::random::<u8>();","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":4886,"byte_end":4919,"line_start":147,"line_end":147,"column_start":1,"column_end":34}},{"value":"/ println!(\"{}\", x);","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":4920,"byte_end":4942,"line_start":148,"line_end":148,"column_start":1,"column_end":23}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":4943,"byte_end":4946,"line_start":149,"line_end":149,"column_start":1,"column_end":4}},{"value":"/ let y = rand::random::<f64>();","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":4947,"byte_end":4981,"line_start":150,"line_end":150,"column_start":1,"column_end":35}},{"value":"/ println!(\"{}\", y);","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":4982,"byte_end":5004,"line_start":151,"line_end":151,"column_start":1,"column_end":23}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":5005,"byte_end":5008,"line_start":152,"line_end":152,"column_start":1,"column_end":4}},{"value":"/ if rand::random() { // generates a boolean","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":5009,"byte_end":5055,"line_start":153,"line_end":153,"column_start":1,"column_end":47}},{"value":"/ println!(\"Better lucky than good!\");","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":5056,"byte_end":5100,"line_start":154,"line_end":154,"column_start":1,"column_end":45}},{"value":"/ }","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":5101,"byte_end":5106,"line_start":155,"line_end":155,"column_start":1,"column_end":6}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":5107,"byte_end":5114,"line_start":156,"line_end":156,"column_start":1,"column_end":8}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":5115,"byte_end":5118,"line_start":157,"line_end":157,"column_start":1,"column_end":4}},{"value":"/ If you're calling `random()` in a loop, caching the generator as in the","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":5119,"byte_end":5194,"line_start":158,"line_end":158,"column_start":1,"column_end":76}},{"value":"/ following example can increase performance.","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":5195,"byte_end":5242,"line_start":159,"line_end":159,"column_start":1,"column_end":48}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":5243,"byte_end":5246,"line_start":160,"line_end":160,"column_start":1,"column_end":4}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":5247,"byte_end":5254,"line_start":161,"line_end":161,"column_start":1,"column_end":8}},{"value":"/ use rand::Rng;","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":5255,"byte_end":5273,"line_start":162,"line_end":162,"column_start":1,"column_end":19}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":5274,"byte_end":5277,"line_start":163,"line_end":163,"column_start":1,"column_end":4}},{"value":"/ let mut v = vec![1, 2, 3];","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":5278,"byte_end":5308,"line_start":164,"line_end":164,"column_start":1,"column_end":31}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":5309,"byte_end":5312,"line_start":165,"line_end":165,"column_start":1,"column_end":4}},{"value":"/ for x in v.iter_mut() {","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":5313,"byte_end":5340,"line_start":166,"line_end":166,"column_start":1,"column_end":28}},{"value":"/ *x = rand::random()","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":5341,"byte_end":5368,"line_start":167,"line_end":167,"column_start":1,"column_end":28}},{"value":"/ }","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":5369,"byte_end":5374,"line_start":168,"line_end":168,"column_start":1,"column_end":6}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":5375,"byte_end":5378,"line_start":169,"line_end":169,"column_start":1,"column_end":4}},{"value":"/ // can be made faster by caching thread_rng","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":5379,"byte_end":5426,"line_start":170,"line_end":170,"column_start":1,"column_end":48}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":5427,"byte_end":5430,"line_start":171,"line_end":171,"column_start":1,"column_end":4}},{"value":"/ let mut rng = rand::thread_rng();","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":5431,"byte_end":5468,"line_start":172,"line_end":172,"column_start":1,"column_end":38}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":5469,"byte_end":5472,"line_start":173,"line_end":173,"column_start":1,"column_end":4}},{"value":"/ for x in v.iter_mut() {","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":5473,"byte_end":5500,"line_start":174,"line_end":174,"column_start":1,"column_end":28}},{"value":"/ *x = rng.gen();","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":5501,"byte_end":5524,"line_start":175,"line_end":175,"column_start":1,"column_end":24}},{"value":"/ }","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":5525,"byte_end":5530,"line_start":176,"line_end":176,"column_start":1,"column_end":6}},{"value":"/ ```","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":5531,"byte_end":5538,"line_start":177,"line_end":177,"column_start":1,"column_end":8}},{"value":"/","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":5539,"byte_end":5542,"line_start":178,"line_end":178,"column_start":1,"column_end":4}},{"value":"/ [`Standard`]: distributions::Standard","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":5543,"byte_end":5584,"line_start":179,"line_end":179,"column_start":1,"column_end":42}},{"value":"cfg(all(feature = \"std\", feature = \"std_rng\"))","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":5585,"byte_end":5634,"line_start":180,"line_end":180,"column_start":1,"column_end":50}},{"value":"inline","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":5709,"byte_end":5718,"line_start":182,"line_end":182,"column_start":1,"column_end":10}}]}],"impls":[{"id":0,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":18417,"byte_end":18431,"line_start":75,"line_end":75,"column_start":23,"column_end":37},"value":"","parent":null,"children":[{"krate":0,"index":42}],"docs":"","sig":null,"attributes":[]},{"id":1,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":18702,"byte_end":18716,"line_start":84,"line_end":84,"column_start":30,"column_end":44},"value":"","parent":null,"children":[],"docs":"","sig":null,"attributes":[]},{"id":2,"kind":"Inherent","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":18726,"byte_end":18735,"line_start":86,"line_end":86,"column_start":6,"column_end":15},"value":"","parent":null,"children":[{"krate":0,"index":45},{"krate":0,"index":46}],"docs":"","sig":null,"attributes":[]},{"id":3,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":20618,"byte_end":20627,"line_start":131,"line_end":131,"column_start":29,"column_end":38},"value":"","parent":null,"children":[{"krate":0,"index":48}],"docs":"","sig":null,"attributes":[]},{"id":4,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":27827,"byte_end":27835,"line_start":135,"line_end":135,"column_start":28,"column_end":36},"value":"","parent":null,"children":[{"krate":0,"index":79},{"krate":0,"index":80},{"krate":0,"index":81}],"docs":"","sig":null,"attributes":[]},{"id":5,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":28403,"byte_end":28411,"line_start":155,"line_end":155,"column_start":39,"column_end":47},"value":"","parent":null,"children":[],"docs":"","sig":null,"attributes":[]},{"id":6,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":29012,"byte_end":29019,"line_start":182,"line_end":182,"column_start":38,"column_end":45},"value":"","parent":null,"children":[{"krate":0,"index":91}],"docs":"","sig":null,"attributes":[]},{"id":7,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/integer.rs","byte_start":45127,"byte_end":45135,"line_start":21,"line_end":21,"column_start":27,"column_end":35},"value":"","parent":null,"children":[{"krate":0,"index":150}],"docs":"","sig":null,"attributes":[]},{"id":8,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/integer.rs","byte_start":45276,"byte_end":45284,"line_start":28,"line_end":28,"column_start":28,"column_end":36},"value":"","parent":null,"children":[{"krate":0,"index":153}],"docs":"","sig":null,"attributes":[]},{"id":9,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/integer.rs","byte_start":45427,"byte_end":45435,"line_start":35,"line_end":35,"column_start":28,"column_end":36},"value":"","parent":null,"children":[{"krate":0,"index":156}],"docs":"","sig":null,"attributes":[]},{"id":10,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/integer.rs","byte_start":45571,"byte_end":45579,"line_start":42,"line_end":42,"column_start":28,"column_end":36},"value":"","parent":null,"children":[{"krate":0,"index":159}],"docs":"","sig":null,"attributes":[]},{"id":11,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/integer.rs","byte_start":45716,"byte_end":45724,"line_start":49,"line_end":49,"column_start":29,"column_end":37},"value":"","parent":null,"children":[{"krate":0,"index":162}],"docs":"","sig":null,"attributes":[]},{"id":12,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/integer.rs","byte_start":46019,"byte_end":46027,"line_start":59,"line_end":59,"column_start":30,"column_end":38},"value":"","parent":null,"children":[{"krate":0,"index":165}],"docs":"","sig":null,"attributes":[]},{"id":13,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":55674,"byte_end":55682,"line_start":74,"line_end":74,"column_start":29,"column_end":37},"value":"","parent":null,"children":[{"krate":0,"index":196}],"docs":"","sig":null,"attributes":[]},{"id":14,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":56584,"byte_end":56592,"line_start":98,"line_end":98,"column_start":21,"column_end":29},"value":"","parent":null,"children":[{"krate":0,"index":200}],"docs":"","sig":null,"attributes":[]},{"id":15,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":57057,"byte_end":57069,"line_start":108,"line_end":108,"column_start":27,"column_end":39},"value":"","parent":null,"children":[{"krate":0,"index":203}],"docs":"","sig":null,"attributes":[]},{"id":16,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":57856,"byte_end":57868,"line_start":128,"line_end":128,"column_start":21,"column_end":33},"value":"","parent":null,"children":[{"krate":0,"index":208}],"docs":"","sig":null,"attributes":[]},{"id":17,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":58124,"byte_end":58132,"line_start":137,"line_end":137,"column_start":29,"column_end":37},"value":"","parent":null,"children":[{"krate":0,"index":211}],"docs":"","sig":null,"attributes":[]},{"id":18,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":59313,"byte_end":59321,"line_start":172,"line_end":172,"column_start":27,"column_end":35},"value":"","parent":null,"children":[{"krate":0,"index":215}],"docs":"","sig":null,"attributes":[]},{"id":19,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":61204,"byte_end":61212,"line_start":233,"line_end":233,"column_start":37,"column_end":45},"value":"","parent":null,"children":[{"krate":0,"index":220}],"docs":"","sig":null,"attributes":[]},{"id":20,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":61556,"byte_end":61564,"line_start":247,"line_end":247,"column_start":39,"column_end":47},"value":"","parent":null,"children":[{"krate":0,"index":224}],"docs":"","sig":null,"attributes":[]},{"id":21,"kind":"Inherent","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":67343,"byte_end":67348,"line_start":70,"line_end":70,"column_start":13,"column_end":18},"value":"","parent":null,"children":[{"krate":0,"index":237}],"docs":"","sig":null,"attributes":[]},{"id":22,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":67772,"byte_end":67777,"line_start":84,"line_end":84,"column_start":37,"column_end":42},"value":"","parent":null,"children":[{"krate":0,"index":241}],"docs":"","sig":null,"attributes":[]},{"id":23,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":68495,"byte_end":68505,"line_start":107,"line_end":107,"column_start":29,"column_end":39},"value":"","parent":null,"children":[{"krate":0,"index":244}],"docs":"","sig":null,"attributes":[]},{"id":24,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":68759,"byte_end":68769,"line_start":117,"line_end":117,"column_start":28,"column_end":38},"value":"","parent":null,"children":[],"docs":"","sig":null,"attributes":[]},{"id":31,"kind":"Inherent","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":85908,"byte_end":85921,"line_start":87,"line_end":87,"column_start":37,"column_end":50},"value":"","parent":null,"children":[{"krate":0,"index":311},{"krate":0,"index":314}],"docs":"","sig":null,"attributes":[]},{"id":32,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":90815,"byte_end":90828,"line_start":223,"line_end":223,"column_start":33,"column_end":46},"value":"","parent":null,"children":[{"krate":0,"index":319}],"docs":"","sig":null,"attributes":[]},{"id":33,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":98152,"byte_end":98165,"line_start":447,"line_end":447,"column_start":28,"column_end":41},"value":"","parent":null,"children":[],"docs":"","sig":null,"attributes":[]},{"id":34,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":98192,"byte_end":98205,"line_start":449,"line_end":449,"column_start":23,"column_end":36},"value":"","parent":null,"children":[{"krate":0,"index":327}],"docs":"","sig":null,"attributes":[]},{"id":35,"kind":"Inherent","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":105881,"byte_end":105888,"line_start":181,"line_end":181,"column_start":24,"column_end":31},"value":"","parent":null,"children":[{"krate":0,"index":371},{"krate":0,"index":374}],"docs":"","sig":null,"attributes":[]},{"id":36,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":106654,"byte_end":106661,"line_start":203,"line_end":203,"column_start":44,"column_end":51},"value":"","parent":null,"children":[{"krate":0,"index":379}],"docs":"","sig":null,"attributes":[]},{"id":37,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":110562,"byte_end":110569,"line_start":304,"line_end":304,"column_start":43,"column_end":50},"value":"","parent":null,"children":[{"krate":0,"index":403}],"docs":"","sig":null,"attributes":[]},{"id":38,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":110726,"byte_end":110733,"line_start":310,"line_end":310,"column_start":52,"column_end":59},"value":"","parent":null,"children":[{"krate":0,"index":406}],"docs":"","sig":null,"attributes":[]},{"id":39,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":111307,"byte_end":111315,"line_start":328,"line_end":328,"column_start":43,"column_end":51},"value":"","parent":null,"children":[{"krate":0,"index":412}],"docs":"","sig":null,"attributes":[]},{"id":40,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":112046,"byte_end":112051,"line_start":357,"line_end":357,"column_start":56,"column_end":61},"value":"","parent":null,"children":[{"krate":0,"index":424},{"krate":0,"index":426}],"docs":"","sig":null,"attributes":[]},{"id":41,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":112351,"byte_end":112365,"line_start":369,"line_end":369,"column_start":56,"column_end":70},"value":"","parent":null,"children":[{"krate":0,"index":429},{"krate":0,"index":431}],"docs":"","sig":null,"attributes":[]},{"id":55,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":127390,"byte_end":127401,"line_start":749,"line_end":749,"column_start":25,"column_end":36},"value":"","parent":null,"children":[{"krate":0,"index":439},{"krate":0,"index":440},{"krate":0,"index":443},{"krate":0,"index":446}],"docs":"","sig":null,"attributes":[]},{"id":58,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":139301,"byte_end":139309,"line_start":1046,"line_end":1046,"column_start":24,"column_end":32},"value":"","parent":null,"children":[{"krate":0,"index":450}],"docs":"","sig":null,"attributes":[]},{"id":59,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":139375,"byte_end":139390,"line_start":1050,"line_end":1050,"column_start":25,"column_end":40},"value":"","parent":null,"children":[{"krate":0,"index":452},{"krate":0,"index":453},{"krate":0,"index":456},{"krate":0,"index":460}],"docs":"","sig":null,"attributes":[]},{"id":60,"kind":"Inherent","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted.rs","byte_start":162637,"byte_end":162650,"line_start":29,"line_end":29,"column_start":21,"column_end":34},"value":"","parent":null,"children":[{"krate":0,"index":482}],"docs":"","sig":null,"attributes":[]},{"id":61,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":174430,"byte_end":174431,"line_start":305,"line_end":305,"column_start":35,"column_end":36},"value":"","parent":null,"children":[],"docs":"","sig":null,"attributes":[]},{"id":62,"kind":"Inherent","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/read.rs","byte_start":191254,"byte_end":191261,"line_start":43,"line_end":43,"column_start":15,"column_end":22},"value":"","parent":null,"children":[{"krate":0,"index":654}],"docs":"","sig":null,"attributes":[]},{"id":63,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/read.rs","byte_start":191415,"byte_end":191422,"line_start":50,"line_end":50,"column_start":27,"column_end":34},"value":"","parent":null,"children":[{"krate":0,"index":657},{"krate":0,"index":658},{"krate":0,"index":659},{"krate":0,"index":661}],"docs":"","sig":null,"attributes":[]},{"id":64,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/read.rs","byte_start":192315,"byte_end":192324,"line_start":84,"line_end":84,"column_start":23,"column_end":32},"value":"","parent":null,"children":[{"krate":0,"index":664}],"docs":"","sig":null,"attributes":[]},{"id":65,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/read.rs","byte_start":192465,"byte_end":192474,"line_start":90,"line_end":90,"column_start":28,"column_end":37},"value":"","parent":null,"children":[{"krate":0,"index":666}],"docs":"","sig":null,"attributes":[]},{"id":66,"kind":"Inherent","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":197576,"byte_end":197588,"line_start":90,"line_end":90,"column_start":15,"column_end":27},"value":"","parent":null,"children":[{"krate":0,"index":694},{"krate":0,"index":695}],"docs":"","sig":null,"attributes":[]},{"id":67,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":198415,"byte_end":198427,"line_start":113,"line_end":113,"column_start":36,"column_end":48},"value":"","parent":null,"children":[{"krate":0,"index":699},{"krate":0,"index":700},{"krate":0,"index":701},{"krate":0,"index":702}],"docs":"","sig":null,"attributes":[]},{"id":68,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":198966,"byte_end":198978,"line_start":137,"line_end":137,"column_start":25,"column_end":37},"value":"","parent":null,"children":[{"krate":0,"index":706}],"docs":"","sig":null,"attributes":[]},{"id":69,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":199305,"byte_end":199317,"line_start":149,"line_end":149,"column_start":29,"column_end":41},"value":"","parent":null,"children":[],"docs":"","sig":null,"attributes":[]},{"id":70,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":199607,"byte_end":199620,"line_start":165,"line_end":165,"column_start":32,"column_end":45},"value":"","parent":null,"children":[{"krate":0,"index":713},{"krate":0,"index":714},{"krate":0,"index":715}],"docs":"","sig":null,"attributes":[]},{"id":71,"kind":"Inherent","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":200463,"byte_end":200476,"line_start":187,"line_end":187,"column_start":15,"column_end":28},"value":"","parent":null,"children":[{"krate":0,"index":719},{"krate":0,"index":723},{"krate":0,"index":725},{"krate":0,"index":726}],"docs":"","sig":null,"attributes":[]},{"id":72,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":203052,"byte_end":203065,"line_start":264,"line_end":264,"column_start":25,"column_end":38},"value":"","parent":null,"children":[{"krate":0,"index":730}],"docs":"","sig":null,"attributes":[]},{"id":73,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":203504,"byte_end":203517,"line_start":280,"line_end":280,"column_start":29,"column_end":42},"value":"","parent":null,"children":[],"docs":"","sig":null,"attributes":[]},{"id":74,"kind":"Inherent","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mock.rs","byte_start":207778,"byte_end":207785,"line_start":37,"line_end":37,"column_start":6,"column_end":13},"value":"","parent":null,"children":[{"krate":0,"index":773}],"docs":"","sig":null,"attributes":[]},{"id":75,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mock.rs","byte_start":208081,"byte_end":208088,"line_start":48,"line_end":48,"column_start":18,"column_end":25},"value":"","parent":null,"children":[{"krate":0,"index":775},{"krate":0,"index":776},{"krate":0,"index":777},{"krate":0,"index":778}],"docs":"","sig":null,"attributes":[]},{"id":76,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/std.rs","byte_start":210470,"byte_end":210476,"line_start":36,"line_end":36,"column_start":18,"column_end":24},"value":"","parent":null,"children":[{"krate":0,"index":800},{"krate":0,"index":801},{"krate":0,"index":802},{"krate":0,"index":803}],"docs":"","sig":null,"attributes":[]},{"id":77,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/std.rs","byte_start":210932,"byte_end":210938,"line_start":58,"line_end":58,"column_start":22,"column_end":28},"value":"","parent":null,"children":[{"krate":0,"index":805},{"krate":0,"index":806},{"krate":0,"index":807}],"docs":"","sig":null,"attributes":[]},{"id":78,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/std.rs","byte_start":211247,"byte_end":211253,"line_start":72,"line_end":72,"column_start":20,"column_end":26},"value":"","parent":null,"children":[],"docs":"","sig":null,"attributes":[]},{"id":79,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/thread.rs","byte_start":215995,"byte_end":216004,"line_start":93,"line_end":93,"column_start":18,"column_end":27},"value":"","parent":null,"children":[{"krate":0,"index":846}],"docs":"","sig":null,"attributes":[]},{"id":80,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/thread.rs","byte_start":216102,"byte_end":216111,"line_start":99,"line_end":99,"column_start":18,"column_end":27},"value":"","parent":null,"children":[{"krate":0,"index":848},{"krate":0,"index":849},{"krate":0,"index":850},{"krate":0,"index":851}],"docs":"","sig":null,"attributes":[]},{"id":81,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/thread.rs","byte_start":217196,"byte_end":217205,"line_start":131,"line_end":131,"column_start":20,"column_end":29},"value":"","parent":null,"children":[],"docs":"","sig":null,"attributes":[]},{"id":82,"kind":"Inherent","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":264932,"byte_end":264940,"line_start":40,"line_end":40,"column_start":6,"column_end":14},"value":"","parent":null,"children":[{"krate":0,"index":895},{"krate":0,"index":896},{"krate":0,"index":897},{"krate":0,"index":898},{"krate":0,"index":900}],"docs":"","sig":null,"attributes":[]},{"id":83,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":266360,"byte_end":266368,"line_start":90,"line_end":90,"column_start":23,"column_end":31},"value":"","parent":null,"children":[{"krate":0,"index":902},{"krate":0,"index":903},{"krate":0,"index":904}],"docs":"","sig":null,"attributes":[]},{"id":84,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":266777,"byte_end":266785,"line_start":104,"line_end":104,"column_start":20,"column_end":28},"value":"","parent":null,"children":[{"krate":0,"index":906}],"docs":"","sig":null,"attributes":[]},{"id":85,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":267375,"byte_end":267383,"line_start":120,"line_end":120,"column_start":25,"column_end":33},"value":"","parent":null,"children":[{"krate":0,"index":911}],"docs":"","sig":null,"attributes":[]},{"id":86,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":267495,"byte_end":267503,"line_start":127,"line_end":127,"column_start":27,"column_end":35},"value":"","parent":null,"children":[{"krate":0,"index":913}],"docs":"","sig":null,"attributes":[]},{"id":87,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":267804,"byte_end":267816,"line_start":143,"line_end":143,"column_start":23,"column_end":35},"value":"","parent":null,"children":[{"krate":0,"index":916},{"krate":0,"index":917},{"krate":0,"index":920}],"docs":"","sig":null,"attributes":[]},{"id":88,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":268351,"byte_end":268363,"line_start":164,"line_end":164,"column_start":32,"column_end":44},"value":"","parent":null,"children":[],"docs":"","sig":null,"attributes":[]},{"id":89,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":268587,"byte_end":268603,"line_start":175,"line_end":175,"column_start":19,"column_end":35},"value":"","parent":null,"children":[{"krate":0,"index":924},{"krate":0,"index":925},{"krate":0,"index":928}],"docs":"","sig":null,"attributes":[]},{"id":90,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":269128,"byte_end":269144,"line_start":197,"line_end":197,"column_start":28,"column_end":44},"value":"","parent":null,"children":[],"docs":"","sig":null,"attributes":[]},{"id":91,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":274173,"byte_end":274180,"line_start":331,"line_end":331,"column_start":28,"column_end":35},"value":"","parent":null,"children":[{"krate":0,"index":953}],"docs":"","sig":null,"attributes":[]},{"id":92,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":274344,"byte_end":274351,"line_start":336,"line_end":336,"column_start":21,"column_end":28},"value":"","parent":null,"children":[{"krate":0,"index":956}],"docs":"","sig":null,"attributes":[]},{"id":93,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":274624,"byte_end":274631,"line_start":343,"line_end":343,"column_start":27,"column_end":34},"value":"","parent":null,"children":[{"krate":0,"index":959}],"docs":"","sig":null,"attributes":[]},{"id":94,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":274751,"byte_end":274758,"line_start":348,"line_end":348,"column_start":20,"column_end":27},"value":"","parent":null,"children":[],"docs":"","sig":null,"attributes":[]},{"id":97,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":239734,"byte_end":239735,"line_start":615,"line_end":615,"column_start":28,"column_end":29},"value":"","parent":null,"children":[],"docs":"","sig":null,"attributes":[]},{"id":98,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":240286,"byte_end":240301,"line_start":632,"line_end":632,"column_start":73,"column_end":88},"value":"","parent":null,"children":[{"krate":0,"index":1092},{"krate":0,"index":1093},{"krate":0,"index":1095}],"docs":"","sig":null,"attributes":[]},{"id":99,"kind":"Direct","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":240753,"byte_end":240768,"line_start":647,"line_end":647,"column_start":9,"column_end":24},"value":"","parent":null,"children":[{"krate":0,"index":1100}],"docs":"","sig":null,"attributes":[]}],"refs":[{"kind":"Mod","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":2859,"byte_end":2872,"line_start":97,"line_end":97,"column_start":9,"column_end":22},"ref_id":{"krate":0,"index":24}},{"kind":"Mod","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":11280,"byte_end":11287,"line_start":110,"line_end":110,"column_start":9,"column_end":16},"ref_id":{"krate":0,"index":332}},{"kind":"Mod","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/mod.rs","byte_start":11488,"byte_end":11496,"line_start":117,"line_end":117,"column_start":9,"column_end":17},"ref_id":{"krate":0,"index":462}},{"kind":"Mod","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":2882,"byte_end":2889,"line_start":98,"line_end":98,"column_start":9,"column_end":16},"ref_id":{"krate":0,"index":531}},{"kind":"Mod","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":2908,"byte_end":2912,"line_start":100,"line_end":100,"column_start":9,"column_end":13},"ref_id":{"krate":0,"index":633}},{"kind":"Mod","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":188550,"byte_end":188557,"line_start":100,"line_end":100,"column_start":33,"column_end":40},"ref_id":{"krate":0,"index":634}},{"kind":"Mod","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mod.rs","byte_start":188568,"byte_end":188572,"line_start":102,"line_end":102,"column_start":9,"column_end":13},"ref_id":{"krate":0,"index":761}},{"kind":"Mod","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/lib.rs","byte_start":2922,"byte_end":2925,"line_start":101,"line_end":101,"column_start":9,"column_end":12},"ref_id":{"krate":0,"index":862}},{"kind":"Mod","span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":218447,"byte_end":218452,"line_start":30,"line_end":30,"column_start":9,"column_end":14},"ref_id":{"krate":0,"index":863}}],"macro_refs":[],"relations":[{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":18417,"byte_end":18431,"line_start":75,"line_end":75,"column_start":23,"column_end":37},"kind":{"Impl":{"id":0}},"from":{"krate":0,"index":1133},"to":{"krate":1,"index":9560}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":18702,"byte_end":18716,"line_start":84,"line_end":84,"column_start":30,"column_end":44},"kind":{"Impl":{"id":1}},"from":{"krate":0,"index":1133},"to":{"krate":4,"index":2338}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":18726,"byte_end":18735,"line_start":86,"line_end":86,"column_start":6,"column_end":15},"kind":{"Impl":{"id":2}},"from":{"krate":0,"index":1122},"to":{"krate":4294967295,"index":4294967295}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/bernoulli.rs","byte_start":20618,"byte_end":20627,"line_start":131,"line_end":131,"column_start":29,"column_end":38},"kind":{"Impl":{"id":3}},"from":{"krate":0,"index":1122},"to":{"krate":0,"index":60}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":27827,"byte_end":27835,"line_start":135,"line_end":135,"column_start":28,"column_end":36},"kind":{"Impl":{"id":4}},"from":{"krate":0,"index":1147},"to":{"krate":1,"index":7822}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":28403,"byte_end":28411,"line_start":155,"line_end":155,"column_start":39,"column_end":47},"kind":{"Impl":{"id":5}},"from":{"krate":0,"index":1147},"to":{"krate":1,"index":8092}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/distribution.rs","byte_start":29012,"byte_end":29019,"line_start":182,"line_end":182,"column_start":38,"column_end":45},"kind":{"Impl":{"id":6}},"from":{"krate":0,"index":1159},"to":{"krate":0,"index":60}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/integer.rs","byte_start":45127,"byte_end":45135,"line_start":21,"line_end":21,"column_start":27,"column_end":35},"kind":{"Impl":{"id":7}},"from":{"krate":0,"index":2060},"to":{"krate":0,"index":60}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/integer.rs","byte_start":45276,"byte_end":45284,"line_start":28,"line_end":28,"column_start":28,"column_end":36},"kind":{"Impl":{"id":8}},"from":{"krate":0,"index":2060},"to":{"krate":0,"index":60}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/integer.rs","byte_start":45427,"byte_end":45435,"line_start":35,"line_end":35,"column_start":28,"column_end":36},"kind":{"Impl":{"id":9}},"from":{"krate":0,"index":2060},"to":{"krate":0,"index":60}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/integer.rs","byte_start":45571,"byte_end":45579,"line_start":42,"line_end":42,"column_start":28,"column_end":36},"kind":{"Impl":{"id":10}},"from":{"krate":0,"index":2060},"to":{"krate":0,"index":60}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/integer.rs","byte_start":45716,"byte_end":45724,"line_start":49,"line_end":49,"column_start":29,"column_end":37},"kind":{"Impl":{"id":11}},"from":{"krate":0,"index":2060},"to":{"krate":0,"index":60}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/integer.rs","byte_start":46019,"byte_end":46027,"line_start":59,"line_end":59,"column_start":30,"column_end":38},"kind":{"Impl":{"id":12}},"from":{"krate":0,"index":2060},"to":{"krate":0,"index":60}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":55674,"byte_end":55682,"line_start":74,"line_end":74,"column_start":29,"column_end":37},"kind":{"Impl":{"id":13}},"from":{"krate":0,"index":2060},"to":{"krate":0,"index":60}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":56584,"byte_end":56592,"line_start":98,"line_end":98,"column_start":21,"column_end":29},"kind":{"Impl":{"id":14}},"from":{"krate":0,"index":2060},"to":{"krate":0,"index":93}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":57057,"byte_end":57069,"line_start":108,"line_end":108,"column_start":27,"column_end":39},"kind":{"Impl":{"id":15}},"from":{"krate":0,"index":1253},"to":{"krate":0,"index":60}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":57856,"byte_end":57868,"line_start":128,"line_end":128,"column_start":21,"column_end":33},"kind":{"Impl":{"id":16}},"from":{"krate":0,"index":1253},"to":{"krate":0,"index":93}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":58124,"byte_end":58132,"line_start":137,"line_end":137,"column_start":29,"column_end":37},"kind":{"Impl":{"id":17}},"from":{"krate":0,"index":2060},"to":{"krate":0,"index":60}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":59313,"byte_end":59321,"line_start":172,"line_end":172,"column_start":27,"column_end":35},"kind":{"Impl":{"id":18}},"from":{"krate":0,"index":2060},"to":{"krate":0,"index":60}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":61204,"byte_end":61212,"line_start":233,"line_end":233,"column_start":37,"column_end":45},"kind":{"Impl":{"id":19}},"from":{"krate":0,"index":2060},"to":{"krate":0,"index":60}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/other.rs","byte_start":61556,"byte_end":61564,"line_start":247,"line_end":247,"column_start":39,"column_end":47},"kind":{"Impl":{"id":20}},"from":{"krate":0,"index":2060},"to":{"krate":0,"index":60}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":67343,"byte_end":67348,"line_start":70,"line_end":70,"column_start":13,"column_end":18},"kind":{"Impl":{"id":21}},"from":{"krate":0,"index":1572},"to":{"krate":4294967295,"index":4294967295}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":67772,"byte_end":67777,"line_start":84,"line_end":84,"column_start":37,"column_end":42},"kind":{"Impl":{"id":22}},"from":{"krate":0,"index":1572},"to":{"krate":0,"index":60}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":68495,"byte_end":68505,"line_start":107,"line_end":107,"column_start":29,"column_end":39},"kind":{"Impl":{"id":23}},"from":{"krate":0,"index":1588},"to":{"krate":1,"index":9560}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/slice.rs","byte_start":68759,"byte_end":68769,"line_start":117,"line_end":117,"column_start":28,"column_end":38},"kind":{"Impl":{"id":24}},"from":{"krate":0,"index":1588},"to":{"krate":4,"index":2338}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/utils.rs","byte_start":76975,"byte_end":76980,"line_start":238,"line_end":238,"column_start":25,"column_end":30},"kind":"SuperTrait","from":{"krate":1,"index":3024},"to":{"krate":0,"index":265}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/utils.rs","byte_start":77186,"byte_end":77191,"line_start":245,"line_end":245,"column_start":31,"column_end":36},"kind":"SuperTrait","from":{"krate":1,"index":3024},"to":{"krate":0,"index":269}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/utils.rs","byte_start":77636,"byte_end":77641,"line_start":266,"line_end":266,"column_start":30,"column_end":35},"kind":"SuperTrait","from":{"krate":1,"index":3024},"to":{"krate":0,"index":274}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":85908,"byte_end":85921,"line_start":87,"line_end":87,"column_start":37,"column_end":50},"kind":{"Impl":{"id":31}},"from":{"krate":0,"index":1646},"to":{"krate":4294967295,"index":4294967295}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":90815,"byte_end":90828,"line_start":223,"line_end":223,"column_start":33,"column_end":46},"kind":{"Impl":{"id":32}},"from":{"krate":0,"index":1646},"to":{"krate":0,"index":60}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":98152,"byte_end":98165,"line_start":447,"line_end":447,"column_start":28,"column_end":41},"kind":{"Impl":{"id":33}},"from":{"krate":0,"index":1663},"to":{"krate":4,"index":2338}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted_index.rs","byte_start":98192,"byte_end":98205,"line_start":449,"line_end":449,"column_start":23,"column_end":36},"kind":{"Impl":{"id":34}},"from":{"krate":0,"index":1663},"to":{"krate":1,"index":9560}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":105881,"byte_end":105888,"line_start":181,"line_end":181,"column_start":24,"column_end":31},"kind":{"Impl":{"id":35}},"from":{"krate":0,"index":1683},"to":{"krate":4294967295,"index":4294967295}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":106654,"byte_end":106661,"line_start":203,"line_end":203,"column_start":44,"column_end":51},"kind":{"Impl":{"id":36}},"from":{"krate":0,"index":1683},"to":{"krate":0,"index":60}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":107077,"byte_end":107082,"line_start":216,"line_end":216,"column_start":26,"column_end":31},"kind":"SuperTrait","from":{"krate":1,"index":3024},"to":{"krate":0,"index":381}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":107657,"byte_end":107662,"line_start":231,"line_end":231,"column_start":27,"column_end":32},"kind":"SuperTrait","from":{"krate":1,"index":3024},"to":{"krate":0,"index":383}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":110562,"byte_end":110569,"line_start":304,"line_end":304,"column_start":43,"column_end":50},"kind":{"Impl":{"id":37}},"from":{"krate":0,"index":1683},"to":{"krate":1,"index":2925}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":110726,"byte_end":110733,"line_start":310,"line_end":310,"column_start":52,"column_end":59},"kind":{"Impl":{"id":38}},"from":{"krate":0,"index":1683},"to":{"krate":1,"index":2925}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":111307,"byte_end":111315,"line_start":328,"line_end":328,"column_start":43,"column_end":51},"kind":{"Impl":{"id":39}},"from":{"krate":0,"index":411},"to":{"krate":0,"index":407}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":112046,"byte_end":112051,"line_start":357,"line_end":357,"column_start":56,"column_end":61},"kind":{"Impl":{"id":40}},"from":{"krate":1,"index":43602},"to":{"krate":0,"index":417}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":112351,"byte_end":112365,"line_start":369,"line_end":369,"column_start":56,"column_end":70},"kind":{"Impl":{"id":41}},"from":{"krate":1,"index":43671},"to":{"krate":0,"index":417}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":127390,"byte_end":127401,"line_start":749,"line_end":749,"column_start":25,"column_end":36},"kind":{"Impl":{"id":55}},"from":{"krate":0,"index":1960},"to":{"krate":0,"index":383}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":139301,"byte_end":139309,"line_start":1046,"line_end":1046,"column_start":24,"column_end":32},"kind":{"Impl":{"id":58}},"from":{"krate":1,"index":47686},"to":{"krate":0,"index":381}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/uniform.rs","byte_start":139375,"byte_end":139390,"line_start":1050,"line_end":1050,"column_start":25,"column_end":40},"kind":{"Impl":{"id":59}},"from":{"krate":0,"index":2017},"to":{"krate":0,"index":383}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/distributions/weighted.rs","byte_start":162637,"byte_end":162650,"line_start":29,"line_end":29,"column_start":21,"column_end":34},"kind":{"Impl":{"id":60}},"from":{"krate":0,"index":2040},"to":{"krate":4294967295,"index":4294967295}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":166593,"byte_end":166600,"line_start":55,"line_end":55,"column_start":16,"column_end":23},"kind":"SuperTrait","from":{"krate":20,"index":188},"to":{"krate":0,"index":603}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rng.rs","byte_start":174430,"byte_end":174431,"line_start":305,"line_end":305,"column_start":35,"column_end":36},"kind":{"Impl":{"id":61}},"from":{"krate":0,"index":623},"to":{"krate":0,"index":603}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/read.rs","byte_start":191254,"byte_end":191261,"line_start":43,"line_end":43,"column_start":15,"column_end":22},"kind":{"Impl":{"id":62}},"from":{"krate":0,"index":2345},"to":{"krate":4294967295,"index":4294967295}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/read.rs","byte_start":191415,"byte_end":191422,"line_start":50,"line_end":50,"column_start":27,"column_end":34},"kind":{"Impl":{"id":63}},"from":{"krate":0,"index":2345},"to":{"krate":20,"index":188}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/read.rs","byte_start":192315,"byte_end":192324,"line_start":84,"line_end":84,"column_start":23,"column_end":32},"kind":{"Impl":{"id":64}},"from":{"krate":0,"index":2351},"to":{"krate":1,"index":9560}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/read.rs","byte_start":192465,"byte_end":192474,"line_start":90,"line_end":90,"column_start":28,"column_end":37},"kind":{"Impl":{"id":65}},"from":{"krate":0,"index":2351},"to":{"krate":4,"index":2338}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":197576,"byte_end":197588,"line_start":90,"line_end":90,"column_start":15,"column_end":27},"kind":{"Impl":{"id":66}},"from":{"krate":0,"index":2356},"to":{"krate":4294967295,"index":4294967295}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":198415,"byte_end":198427,"line_start":113,"line_end":113,"column_start":36,"column_end":48},"kind":{"Impl":{"id":67}},"from":{"krate":0,"index":2356},"to":{"krate":20,"index":188}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":198966,"byte_end":198978,"line_start":137,"line_end":137,"column_start":25,"column_end":37},"kind":{"Impl":{"id":68}},"from":{"krate":0,"index":2356},"to":{"krate":1,"index":2640}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":199305,"byte_end":199317,"line_start":149,"line_end":149,"column_start":29,"column_end":41},"kind":{"Impl":{"id":69}},"from":{"krate":0,"index":2356},"to":{"krate":20,"index":193}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":199607,"byte_end":199620,"line_start":165,"line_end":165,"column_start":32,"column_end":45},"kind":{"Impl":{"id":70}},"from":{"krate":0,"index":2365},"to":{"krate":20,"index":48}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":200463,"byte_end":200476,"line_start":187,"line_end":187,"column_start":15,"column_end":28},"kind":{"Impl":{"id":71}},"from":{"krate":0,"index":2365},"to":{"krate":4294967295,"index":4294967295}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":203052,"byte_end":203065,"line_start":264,"line_end":264,"column_start":25,"column_end":38},"kind":{"Impl":{"id":72}},"from":{"krate":0,"index":2365},"to":{"krate":1,"index":2640}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/adapter/reseeding.rs","byte_start":203504,"byte_end":203517,"line_start":280,"line_end":280,"column_start":29,"column_end":42},"kind":{"Impl":{"id":73}},"from":{"krate":0,"index":2365},"to":{"krate":20,"index":193}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mock.rs","byte_start":207778,"byte_end":207785,"line_start":37,"line_end":37,"column_start":6,"column_end":13},"kind":{"Impl":{"id":74}},"from":{"krate":0,"index":2377},"to":{"krate":4294967295,"index":4294967295}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/mock.rs","byte_start":208081,"byte_end":208088,"line_start":48,"line_end":48,"column_start":18,"column_end":25},"kind":{"Impl":{"id":75}},"from":{"krate":0,"index":2377},"to":{"krate":20,"index":188}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/std.rs","byte_start":210470,"byte_end":210476,"line_start":36,"line_end":36,"column_start":18,"column_end":24},"kind":{"Impl":{"id":76}},"from":{"krate":0,"index":2391},"to":{"krate":20,"index":188}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/std.rs","byte_start":210932,"byte_end":210938,"line_start":58,"line_end":58,"column_start":22,"column_end":28},"kind":{"Impl":{"id":77}},"from":{"krate":0,"index":2391},"to":{"krate":20,"index":194}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/std.rs","byte_start":211247,"byte_end":211253,"line_start":72,"line_end":72,"column_start":20,"column_end":26},"kind":{"Impl":{"id":78}},"from":{"krate":0,"index":2391},"to":{"krate":20,"index":193}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/thread.rs","byte_start":215995,"byte_end":216004,"line_start":93,"line_end":93,"column_start":18,"column_end":27},"kind":{"Impl":{"id":79}},"from":{"krate":0,"index":2405},"to":{"krate":1,"index":2997}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/thread.rs","byte_start":216102,"byte_end":216111,"line_start":99,"line_end":99,"column_start":18,"column_end":27},"kind":{"Impl":{"id":80}},"from":{"krate":0,"index":2405},"to":{"krate":20,"index":188}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/thread.rs","byte_start":217196,"byte_end":217205,"line_start":131,"line_end":131,"column_start":20,"column_end":29},"kind":{"Impl":{"id":81}},"from":{"krate":0,"index":2405},"to":{"krate":20,"index":193}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":264932,"byte_end":264940,"line_start":40,"line_end":40,"column_start":6,"column_end":14},"kind":{"Impl":{"id":82}},"from":{"krate":0,"index":2416},"to":{"krate":4294967295,"index":4294967295}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":266360,"byte_end":266368,"line_start":90,"line_end":90,"column_start":23,"column_end":31},"kind":{"Impl":{"id":83}},"from":{"krate":0,"index":2416},"to":{"krate":1,"index":7633}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":266777,"byte_end":266785,"line_start":104,"line_end":104,"column_start":20,"column_end":28},"kind":{"Impl":{"id":84}},"from":{"krate":0,"index":2416},"to":{"krate":1,"index":2670}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":267375,"byte_end":267383,"line_start":120,"line_end":120,"column_start":25,"column_end":33},"kind":{"Impl":{"id":85}},"from":{"krate":0,"index":2416},"to":{"krate":1,"index":2925}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":267495,"byte_end":267503,"line_start":127,"line_end":127,"column_start":27,"column_end":35},"kind":{"Impl":{"id":86}},"from":{"krate":0,"index":2416},"to":{"krate":1,"index":2925}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":267804,"byte_end":267816,"line_start":143,"line_end":143,"column_start":23,"column_end":35},"kind":{"Impl":{"id":87}},"from":{"krate":0,"index":2427},"to":{"krate":1,"index":7822}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":268351,"byte_end":268363,"line_start":164,"line_end":164,"column_start":32,"column_end":44},"kind":{"Impl":{"id":88}},"from":{"krate":0,"index":2427},"to":{"krate":1,"index":7702}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":268587,"byte_end":268603,"line_start":175,"line_end":175,"column_start":19,"column_end":35},"kind":{"Impl":{"id":89}},"from":{"krate":0,"index":2438},"to":{"krate":1,"index":7822}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":269128,"byte_end":269144,"line_start":197,"line_end":197,"column_start":28,"column_end":44},"kind":{"Impl":{"id":90}},"from":{"krate":0,"index":2438},"to":{"krate":1,"index":7702}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":274173,"byte_end":274180,"line_start":331,"line_end":331,"column_start":28,"column_end":35},"kind":{"Impl":{"id":91}},"from":{"krate":0,"index":947},"to":{"krate":1,"index":2717}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":274344,"byte_end":274351,"line_start":336,"line_end":336,"column_start":21,"column_end":28},"kind":{"Impl":{"id":92}},"from":{"krate":0,"index":947},"to":{"krate":1,"index":2706}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":274624,"byte_end":274631,"line_start":343,"line_end":343,"column_start":27,"column_end":34},"kind":{"Impl":{"id":93}},"from":{"krate":0,"index":947},"to":{"krate":1,"index":2670}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":274751,"byte_end":274758,"line_start":348,"line_end":348,"column_start":20,"column_end":27},"kind":{"Impl":{"id":94}},"from":{"krate":0,"index":947},"to":{"krate":1,"index":2675}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":279359,"byte_end":279363,"line_start":473,"line_end":473,"column_start":13,"column_end":17},"kind":"SuperTrait","from":{"krate":1,"index":3029},"to":{"krate":0,"index":970}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":279366,"byte_end":279376,"line_start":473,"line_end":473,"column_start":20,"column_end":30},"kind":"SuperTrait","from":{"krate":1,"index":2717},"to":{"krate":0,"index":970}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":279379,"byte_end":279382,"line_start":473,"line_end":473,"column_start":33,"column_end":36},"kind":"SuperTrait","from":{"krate":1,"index":2706},"to":{"krate":0,"index":970}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":279385,"byte_end":279394,"line_start":473,"line_end":473,"column_start":39,"column_end":48},"kind":"SuperTrait","from":{"krate":1,"index":2670},"to":{"krate":0,"index":970}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":279397,"byte_end":279399,"line_start":473,"line_end":473,"column_start":51,"column_end":53},"kind":"SuperTrait","from":{"krate":1,"index":2675},"to":{"krate":0,"index":970}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":279402,"byte_end":279415,"line_start":473,"line_end":473,"column_start":56,"column_end":69},"kind":"SuperTrait","from":{"krate":0,"index":381},"to":{"krate":0,"index":970}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":279434,"byte_end":279438,"line_start":474,"line_end":474,"column_start":19,"column_end":23},"kind":"SuperTrait","from":{"krate":1,"index":9760},"to":{"krate":0,"index":970}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/index.rs","byte_start":279452,"byte_end":279461,"line_start":474,"line_end":474,"column_start":37,"column_end":46},"kind":"SuperTrait","from":{"krate":1,"index":3117},"to":{"krate":0,"index":970}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":228006,"byte_end":228014,"line_start":288,"line_end":288,"column_start":27,"column_end":35},"kind":"SuperTrait","from":{"krate":1,"index":7822},"to":{"krate":0,"index":1032}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":228017,"byte_end":228022,"line_start":288,"line_end":288,"column_start":38,"column_end":43},"kind":"SuperTrait","from":{"krate":1,"index":3024},"to":{"krate":0,"index":1032}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":239734,"byte_end":239735,"line_start":615,"line_end":615,"column_start":28,"column_end":29},"kind":{"Impl":{"id":97}},"from":{"krate":0,"index":1087},"to":{"krate":0,"index":1032}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":240286,"byte_end":240301,"line_start":632,"line_end":632,"column_start":73,"column_end":88},"kind":{"Impl":{"id":98}},"from":{"krate":0,"index":2449},"to":{"krate":1,"index":7822}},{"span":{"file_name":"/home/gallant/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/seq/mod.rs","byte_start":240753,"byte_end":240768,"line_start":647,"line_end":647,"column_start":9,"column_end":24},"kind":{"Impl":{"id":99}},"from":{"krate":0,"index":2449},"to":{"krate":1,"index":7702}}]}