Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustdoc --output-format json command seems broken #25108

Closed
GuillaumeGomez opened this issue May 4, 2015 · 10 comments · Fixed by #32773
Closed

rustdoc --output-format json command seems broken #25108

GuillaumeGomez opened this issue May 4, 2015 · 10 comments · Fixed by #32773
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@GuillaumeGomez
Copy link
Member

I tried this command:

> rustdoc --output-format json src/sysinfo.rs

On this repo.

Result:

src/sysinfo.rs:13:1: 13:19 error: use of unstable library feature 'libc'
src/sysinfo.rs:13 extern crate libc;
                  ^~~~~~~~~~~~~~~~~~
src/sysinfo.rs:13:1: 13:19 help: add #![feature(libc)] to the crate attributes to enable
src/processus.rs:43:42: 43:47 error: use of unstable library feature 'libc'
src/processus.rs:43         unsafe { ::ffi::kill(self.pid as c_int, signal as c_int) == 0 }
                                                             ^~~~~
src/processus.rs:43:42: 43:47 help: add #![feature(libc)] to the crate attributes to enable
src/processus.rs:43:59: 43:64 error: use of unstable library feature 'libc'
src/processus.rs:43         unsafe { ::ffi::kill(self.pid as c_int, signal as c_int) == 0 }
                                                                              ^~~~~
src/processus.rs:43:59: 43:64 help: add #![feature(libc)] to the crate attributes to enable
src/system.rs:15:5: 15:41 error: use of unstable library feature 'libc'
src/system.rs:15 use libc::types::os::arch::posix01::stat;
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/system.rs:15:5: 15:41 help: add #![feature(libc)] to the crate attributes to enable
src/system.rs:16:5: 16:17 error: use of unstable library feature 'libc'
src/system.rs:16 use libc::c_char;
                     ^~~~~~~~~~~~
src/system.rs:16:5: 16:17 help: add #![feature(libc)] to the crate attributes to enable
src/system.rs:17:5: 17:39 error: use of unstable library feature 'libc'
src/system.rs:17 use libc::funcs::posix01::stat_::lstat;
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/system.rs:17:5: 17:39 help: add #![feature(libc)] to the crate attributes to enable
src/system.rs:279:35: 279:39 error: use of unstable library feature 'libc'
src/system.rs:279                     let mut buf : stat = unsafe { ::std::mem::uninitialized() };
                                                    ^~~~
src/system.rs:279:35: 279:39 help: add #![feature(libc)] to the crate attributes to enable
src/system.rs:280:90: 280:96 error: use of unstable library feature 'libc'
src/system.rs:280                     let res = unsafe { lstat(result.to_str().unwrap().as_ptr() as *const c_char, &mut buf as *mut stat) };
                                                                                                           ^~~~~~
src/system.rs:280:90: 280:96 help: add #![feature(libc)] to the crate attributes to enable
src/system.rs:280:115: 280:119 error: use of unstable library feature 'libc'
src/system.rs:280                     let res = unsafe { lstat(result.to_str().unwrap().as_ptr() as *const c_char, &mut buf as *mut stat) };
                                                                                                                                    ^~~~
src/system.rs:280:115: 280:119 help: add #![feature(libc)] to the crate attributes to enable
src/system.rs:280:40: 280:45 error: use of unstable library feature 'libc'
src/system.rs:280                     let res = unsafe { lstat(result.to_str().unwrap().as_ptr() as *const c_char, &mut buf as *mut stat) };
                                                         ^~~~~
src/system.rs:280:40: 280:45 help: add #![feature(libc)] to the crate attributes to enable
src/system.rs:282:40: 282:47 error: use of unstable library feature 'libc'
src/system.rs:282                     if res < 0 || (buf.st_mode  & S_IFMT) != S_IFLNK {
                                                         ^~~~~~~
src/system.rs:282:40: 282:47 help: add #![feature(libc)] to the crate attributes to enable
src/system.rs:282:51: 282:57 error: use of unstable library feature 'libc'
src/system.rs:282                     if res < 0 || (buf.st_mode  & S_IFMT) != S_IFLNK {
                                                                    ^~~~~~
src/system.rs:282:51: 282:57 help: add #![feature(libc)] to the crate attributes to enable
src/system.rs:282:62: 282:69 error: use of unstable library feature 'libc'
src/system.rs:282                     if res < 0 || (buf.st_mode  & S_IFMT) != S_IFLNK {
                                                                               ^~~~~~~
src/system.rs:282:62: 282:69 help: add #![feature(libc)] to the crate attributes to enable
src/ffi.rs:10:19: 10:24 error: use of unstable library feature 'libc'
src/ffi.rs:10   pub fn kill(pid: c_int, signal: c_int) -> c_int;
                                 ^~~~~
src/ffi.rs:10:19: 10:24 help: add #![feature(libc)] to the crate attributes to enable
src/ffi.rs:10:34: 10:39 error: use of unstable library feature 'libc'
src/ffi.rs:10   pub fn kill(pid: c_int, signal: c_int) -> c_int;
                                                ^~~~~
src/ffi.rs:10:34: 10:39 help: add #![feature(libc)] to the crate attributes to enable
src/ffi.rs:10:44: 10:49 error: use of unstable library feature 'libc'
src/ffi.rs:10   pub fn kill(pid: c_int, signal: c_int) -> c_int;
                                                          ^~~~~
src/ffi.rs:10:44: 10:49 help: add #![feature(libc)] to the crate attributes to enable
error: aborting due to 16 previous errors
thread '<unnamed>' panicked at 'Box<Any>', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libsyntax/diagnostic.rs:192
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: "rustc failed"', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libcore/result.rs:729
thread '<main>' panicked at 'called `Result::unwrap()` on an `Err` value: Any', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libcore/result.rs:729

So then I added the "missing" feature (that's weird by the way) and then I got:

> rustdoc --output-format json src/sysinfo.rs 
thread '<unnamed>' panicked at 'Rust generated JSON is invalid: SyntaxError(EOFWhileParsingObject, 1, 99690)', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/librustdoc/lib.rs:525
thread '<main>' panicked at 'called `Result::unwrap()` on an `Err` value: Any', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libcore/result.rs:729

I guess rustdoc is broken somehow ? Here's my current rustdoc version:

> rustdoc --version
rustdoc 1.1.0-nightly (ce1150b9f 2015-05-04) (built 2015-05-04)
@sanxiyn sanxiyn added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label May 6, 2015
@retep998
Copy link
Member

retep998 commented May 8, 2015

That part about libc isn't weird, because normally when you invoke cargo doc it passes in all the dependency information, including the external libc. But when you invoked rustdoc manually you didn't include that dependency information, this the only libc it knew about was the internal one which is unstable.

@GuillaumeGomez
Copy link
Member Author

So how am I supposed to test it ? Or just make it work ?

@retep998
Copy link
Member

retep998 commented May 9, 2015

Do cargo doc --verbose to get the exact command that Cargo uses to invoke rustdoc, and then modify that command to add the --output-format json bit.

@GuillaumeGomez
Copy link
Member Author

It uses rustc and not rustdoc, I'll have to find what the equivalent of --output-format json is. Thanks for your help.

@GuillaumeGomez
Copy link
Member Author

Never mind, I'm just getting really tired... Here is what I get :

> rustdoc src/sysinfo.rs --crate-name sysinfo -o /home/imperio/rust/sysinfo/target/doc -L dependency=/home/imperio/rust/sysinfo/target/debug -L dependency=/home/imperio/rust/sysinfo/target/debug/deps --extern libc=/home/imperio/rust/sysinfo/target/debug/deps/liblibc-9b7976990ae0dbd4.rlib --extern libc=/home/imperio/rust/sysinfo/target/debug/deps/liblibc-9b7976990ae0dbd4.rlib --output-format json
thread '<unnamed>' panicked at 'Rust generated JSON is invalid: SyntaxError(EOFWhileParsingObject, 1, 105198)', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/librustdoc/lib.rs:525
thread '<main>' panicked at 'called `Result::unwrap()` on an `Err` value: Any', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libcore/result.rs:729

If I'm not wrong, that's the same error...

@bltavares
Copy link
Contributor

Triaging:

Still happening on rustdoc 1.7.0-nightly (8f11a9ef4 2016-01-03)

@bltavares
Copy link
Contributor

I was able to reduce it to this point on the rustdoc.

let crate_json_str = format!("{}", json::as_json(&krate));

The generated json is prematurely ending after opening the external_crates property

{"name":"sysinfo","src":"src/sysinfo.rs","module":{"source":{"filename":"src/sysinfo.rs","loline":7,"locol":0,"hiline":92,"hicol":0},"name":"","attrs":[{"variant":"NameValue","fields":["crate_name","sysinfo"]},{"variant":"NameValue","fields":["crate_type","lib"]},{"variant":"NameValue","fields":["crate_type","rlib"]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["libc"]}]]}],"inner":{"variant":"ModuleItem","fields":[{"items":[{"source":{"filename":"src/sysinfo.rs","loline":14,"locol":0,"hiline":14,"hicol":31},"name":null,"attrs":[],"inner":{"variant":"ImportItem","fields":[{"variant":"SimpleImport","fields":["Process",{"path":{"global":false,"segments":[{"name":"self","params":{"variant":"AngleBracketed","fields":[[],[],[]]}},{"name":"process","params":{"variant":"AngleBracketed","fields":[[],[],[]]}},{"name":"Process","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},"did":{"krate":0,"index":{"_field0":12}}}]}]},"visibility":"Public","def_id":{"krate":0,"index":{"_field0":0}},"stability":null},{"source":{"filename":"src/sysinfo.rs","loline":15,"locol":0,"hiline":15,"hicol":35},"name":null,"attrs":[],"inner":{"variant":"ImportItem","fields":[{"variant":"SimpleImport","fields":["Processor",{"path":{"global":false,"segments":[{"name":"self","params":{"variant":"AngleBracketed","fields":[[],[],[]]}},{"name":"processor","params":{"variant":"AngleBracketed","fields":[[],[],[]]}},{"name":"Processor","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},"did":{"krate":0,"index":{"_field0":148}}}]}]},"visibility":"Public","def_id":{"krate":0,"index":{"_field0":0}},"stability":null},{"source":{"filename":"src/sysinfo.rs","loline":16,"locol":0,"hiline":16,"hicol":24},"name":null,"attrs":[],"inner":{"variant":"ImportItem","fields":[{"variant":"GlobImport","fields":[{"path":{"global":false,"segments":[{"name":"self","params":{"variant":"AngleBracketed","fields":[[],[],[]]}},{"name":"system","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},"did":{"krate":0,"index":{"_field0":219}}}]}]},"visibility":"Public","def_id":{"krate":0,"index":{"_field0":0}},"stability":null},{"source":{"filename":"src/sysinfo.rs","loline":25,"locol":0,"hiline":92,"hicol":1},"name":"Signal","attrs":[{"variant":"List","fields":["repr",[{"variant":"Word","fields":["C"]}]]}],"inner":{"variant":"EnumItem","fields":[{"variants":[{"source":{"filename":"src/sysinfo.rs","loline":27,"locol":1,"hiline":27,"hicol":11},"name":"Hangup","attrs":[{"variant":"NameValue","fields":["doc","Hangup detected on controlling terminal or death of controlling processus"]}],"inner":{"variant":"VariantItem","fields":[{"kind":"CLikeVariant"}]},"visibility":null,"def_id":{"krate":0,"index":{"_field0":357}},"stability":null},{"source":{"filename":"src/sysinfo.rs","loline":29,"locol":1,"hiline":29,"hicol":14},"name":"Interrupt","attrs":[{"variant":"NameValue","fields":["doc","Interrupt from keyboard"]}],"inner":{"variant":"VariantItem","fields":[{"kind":"CLikeVariant"}]},"visibility":null,"def_id":{"krate":0,"index":{"_field0":358}},"stability":null},{"source":{"filename":"src/sysinfo.rs","loline":31,"locol":1,"hiline":31,"hicol":9},"name":"Quit","attrs":[{"variant":"NameValue","fields":["doc","Quit from keyboard"]}],"inner":{"variant":"VariantItem","fields":[{"kind":"CLikeVariant"}]},"visibility":null,"def_id":{"krate":0,"index":{"_field0":359}},"stability":null},{"source":{"filename":"src/sysinfo.rs","loline":33,"locol":1,"hiline":33,"hicol":12},"name":"Illegal","attrs":[{"variant":"NameValue","fields":["doc","Illegal instruction"]}],"inner":{"variant":"VariantItem","fields":[{"kind":"CLikeVariant"}]},"visibility":null,"def_id":{"krate":0,"index":{"_field0":360}},"stability":null},{"source":{"filename":"src/sysinfo.rs","loline":35,"locol":1,"hiline":35,"hicol":9},"name":"Trap","attrs":[{"variant":"NameValue","fields":["doc","Trace/breakpoint trap"]}],"inner":{"variant":"VariantItem","fields":[{"kind":"CLikeVariant"}]},"visibility":null,"def_id":{"krate":0,"index":{"_field0":361}},"stability":null},{"source":{"filename":"src/sysinfo.rs","loline":37,"locol":1,"hiline":37,"hicol":10},"name":"Abort","attrs":[{"variant":"NameValue","fields":["doc","Abort signal from C abort function"]}],"inner":{"variant":"VariantItem","fields":[{"kind":"CLikeVariant"}]},"visibility":null,"def_id":{"krate":0,"index":{"_field0":362}},"stability":null},{"source":{"filename":"src/sysinfo.rs","loline":41,"locol":1,"hiline":41,"hicol":8},"name":"Bus","attrs":[{"variant":"NameValue","fields":["doc","Bus error (bad memory access)"]}],"inner":{"variant":"VariantItem","fields":[{"kind":"CLikeVariant"}]},"visibility":null,"def_id":{"krate":0,"index":{"_field0":363}},"stability":null},{"source":{"filename":"src/sysinfo.rs","loline":43,"locol":1,"hiline":43,"hicol":27},"name":"FloatingPointException","attrs":[{"variant":"NameValue","fields":["doc","Floating point exception"]}],"inner":{"variant":"VariantItem","fields":[{"kind":"CLikeVariant"}]},"visibility":null,"def_id":{"krate":0,"index":{"_field0":364}},"stability":null},{"source":{"filename":"src/sysinfo.rs","loline":45,"locol":1,"hiline":45,"hicol":9},"name":"Kill","attrs":[{"variant":"NameValue","fields":["doc","Kill signal"]}],"inner":{"variant":"VariantItem","fields":[{"kind":"CLikeVariant"}]},"visibility":null,"def_id":{"krate":0,"index":{"_field0":365}},"stability":null},{"source":{"filename":"src/sysinfo.rs","loline":47,"locol":1,"hiline":47,"hicol":11},"name":"User1","attrs":[{"variant":"NameValue","fields":["doc","User-defined signal 1"]}],"inner":{"variant":"VariantItem","fields":[{"kind":"CLikeVariant"}]},"visibility":null,"def_id":{"krate":0,"index":{"_field0":366}},"stability":null},{"source":{"filename":"src/sysinfo.rs","loline":49,"locol":1,"hiline":49,"hicol":10},"name":"Segv","attrs":[{"variant":"NameValue","fields":["doc","Invalid memory reference"]}],"inner":{"variant":"VariantItem","fields":[{"kind":"CLikeVariant"}]},"visibility":null,"def_id":{"krate":0,"index":{"_field0":367}},"stability":null},{"source":{"filename":"src/sysinfo.rs","loline":51,"locol":1,"hiline":51,"hicol":11},"name":"User2","attrs":[{"variant":"NameValue","fields":["doc","User-defined signal 2"]}],"inner":{"variant":"VariantItem","fields":[{"kind":"CLikeVariant"}]},"visibility":null,"def_id":{"krate":0,"index":{"_field0":368}},"stability":null},{"source":{"filename":"src/sysinfo.rs","loline":53,"locol":1,"hiline":53,"hicol":10},"name":"Pipe","attrs":[{"variant":"NameValue","fields":["doc","Broken pipe: write to pipe with no readers"]}],"inner":{"variant":"VariantItem","fields":[{"kind":"CLikeVariant"}]},"visibility":null,"def_id":{"krate":0,"index":{"_field0":369}},"stability":null},{"source":{"filename":"src/sysinfo.rs","loline":55,"locol":1,"hiline":55,"hicol":11},"name":"Alarm","attrs":[{"variant":"NameValue","fields":["doc","Timer signal from C alarm function"]}],"inner":{"variant":"VariantItem","fields":[{"kind":"CLikeVariant"}]},"visibility":null,"def_id":{"krate":0,"index":{"_field0":370}},"stability":null},{"source":{"filename":"src/sysinfo.rs","loline":57,"locol":1,"hiline":57,"hicol":10},"name":"Term","attrs":[{"variant":"NameValue","fields":["doc","Termination signal"]}],"inner":{"variant":"VariantItem","fields":[{"kind":"CLikeVariant"}]},"visibility":null,"def_id":{"krate":0,"index":{"_field0":371}},"stability":null},{"source":{"filename":"src/sysinfo.rs","loline":59,"locol":1,"hiline":59,"hicol":12},"name":"Stklft","attrs":[{"variant":"NameValue","fields":["doc","Stack fault on coprocessor (unused)"]}],"inner":{"variant":"VariantItem","fields":[{"kind":"CLikeVariant"}]},"visibility":null,"def_id":{"krate":0,"index":{"_field0":372}},"stability":null},{"source":{"filename":"src/sysinfo.rs","loline":61,"locol":1,"hiline":61,"hicol":11},"name":"Child","attrs":[{"variant":"NameValue","fields":["doc","Child stopped or terminated"]}],"inner":{"variant":"VariantItem","fields":[{"kind":"CLikeVariant"}]},"visibility":null,"def_id":{"krate":0,"index":{"_field0":373}},"stability":null},{"source":{"filename":"src/sysinfo.rs","loline":63,"locol":1,"hiline":63,"hicol":14},"name":"Continue","attrs":[{"variant":"NameValue","fields":["doc","Continue if stopped"]}],"inner":{"variant":"VariantItem","fields":[{"kind":"CLikeVariant"}]},"visibility":null,"def_id":{"krate":0,"index":{"_field0":374}},"stability":null},{"source":{"filename":"src/sysinfo.rs","loline":65,"locol":1,"hiline":65,"hicol":10},"name":"Stop","attrs":[{"variant":"NameValue","fields":["doc","Stop process"]}],"inner":{"variant":"VariantItem","fields":[{"kind":"CLikeVariant"}]},"visibility":null,"def_id":{"krate":0,"index":{"_field0":375}},"stability":null},{"source":{"filename":"src/sysinfo.rs","loline":67,"locol":1,"hiline":67,"hicol":10},"name":"TSTP","attrs":[{"variant":"NameValue","fields":["doc","Stop typed at terminal"]}],"inner":{"variant":"VariantItem","fields":[{"kind":"CLikeVariant"}]},"visibility":null,"def_id":{"krate":0,"index":{"_field0":376}},"stability":null},{"source":{"filename":"src/sysinfo.rs","loline":69,"locol":1,"hiline":69,"hicol":10},"name":"TTIN","attrs":[{"variant":"NameValue","fields":["doc","Terminal input for background process"]}],"inner":{"variant":"VariantItem","fields":[{"kind":"CLikeVariant"}]},"visibility":null,"def_id":{"krate":0,"index":{"_field0":377}},"stability":null},{"source":{"filename":"src/sysinfo.rs","loline":71,"locol":1,"hiline":71,"hicol":10},"name":"TTOU","attrs":[{"variant":"NameValue","fields":["doc","Terminal output for background process"]}],"inner":{"variant":"VariantItem","fields":[{"kind":"CLikeVariant"}]},"visibility":null,"def_id":{"krate":0,"index":{"_field0":378}},"stability":null},{"source":{"filename":"src/sysinfo.rs","loline":73,"locol":1,"hiline":73,"hicol":12},"name":"Urgent","attrs":[{"variant":"NameValue","fields":["doc","Urgent condition on socket"]}],"inner":{"variant":"VariantItem","fields":[{"kind":"CLikeVariant"}]},"visibility":null,"def_id":{"krate":0,"index":{"_field0":379}},"stability":null},{"source":{"filename":"src/sysinfo.rs","loline":75,"locol":1,"hiline":75,"hicol":10},"name":"XCPU","attrs":[{"variant":"NameValue","fields":["doc","CPU time limit exceeded"]}],"inner":{"variant":"VariantItem","fields":[{"kind":"CLikeVariant"}]},"visibility":null,"def_id":{"krate":0,"index":{"_field0":380}},"stability":null},{"source":{"filename":"src/sysinfo.rs","loline":77,"locol":1,"hiline":77,"hicol":10},"name":"XFSZ","attrs":[{"variant":"NameValue","fields":["doc","File size limit exceeded"]}],"inner":{"variant":"VariantItem","fields":[{"kind":"CLikeVariant"}]},"visibility":null,"def_id":{"krate":0,"index":{"_field0":381}},"stability":null},{"source":{"filename":"src/sysinfo.rs","loline":79,"locol":1,"hiline":79,"hicol":18},"name":"VirtualAlarm","attrs":[{"variant":"NameValue","fields":["doc","Virtual alarm clock"]}],"inner":{"variant":"VariantItem","fields":[{"kind":"CLikeVariant"}]},"visibility":null,"def_id":{"krate":0,"index":{"_field0":382}},"stability":null},{"source":{"filename":"src/sysinfo.rs","loline":81,"locol":1,"hiline":81,"hicol":15},"name":"Profiling","attrs":[{"variant":"NameValue","fields":["doc","Profiling time expired"]}],"inner":{"variant":"VariantItem","fields":[{"kind":"CLikeVariant"}]},"visibility":null,"def_id":{"krate":0,"index":{"_field0":383}},"stability":null},{"source":{"filename":"src/sysinfo.rs","loline":83,"locol":1,"hiline":83,"hicol":11},"name":"Winch","attrs":[{"variant":"NameValue","fields":["doc","Windows resize signal"]}],"inner":{"variant":"VariantItem","fields":[{"kind":"CLikeVariant"}]},"visibility":null,"def_id":{"krate":0,"index":{"_field0":384}},"stability":null},{"source":{"filename":"src/sysinfo.rs","loline":85,"locol":1,"hiline":85,"hicol":8},"name":"IO","attrs":[{"variant":"NameValue","fields":["doc","I/O now possible"]}],"inner":{"variant":"VariantItem","fields":[{"kind":"CLikeVariant"}]},"visibility":null,"def_id":{"krate":0,"index":{"_field0":385}},"stability":null},{"source":{"filename":"src/sysinfo.rs","loline":89,"locol":1,"hiline":89,"hicol":11},"name":"Power","attrs":[{"variant":"NameValue","fields":["doc","Power failure (System V)"]}],"inner":{"variant":"VariantItem","fields":[{"kind":"CLikeVariant"}]},"visibility":null,"def_id":{"krate":0,"index":{"_field0":386}},"stability":null},{"source":{"filename":"src/sysinfo.rs","loline":91,"locol":1,"hiline":91,"hicol":9},"name":"Sys","attrs":[{"variant":"NameValue","fields":["doc","Bad argument to routine (SVr4)"]}],"inner":{"variant":"VariantItem","fields":[{"kind":"CLikeVariant"}]},"visibility":null,"def_id":{"krate":0,"index":{"_field0":387}},"stability":null}],"generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"variants_stripped":false}]},"visibility":"Public","def_id":{"krate":0,"index":{"_field0":356}},"stability":null},{"source":{"filename":"src/process.rs","loline":7,"locol":0,"hiline":88,"hicol":1},"name":"process","attrs":[],"inner":{"variant":"ModuleItem","fields":[{"items":[{"source":{"filename":"src/process.rs","loline":11,"locol":0,"hiline":27,"hicol":1},"name":"Process","attrs":[],"inner":{"variant":"StructItem","fields":[{"struct_type":"Plain","generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"fields":[{"source":{"filename":"src/process.rs","loline":12,"locol":4,"hiline":12,"hicol":20},"name":"name","attrs":[],"inner":{"variant":"StructFieldItem","fields":[{"variant":"TypedStructField","fields":[{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"String","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":3,"index":{"_field0":3581}},false]}]}]},"visibility":"Public","def_id":{"krate":0,"index":{"_field0":13}},"stability":null},{"source":{"filename":"src/process.rs","loline":13,"locol":4,"hiline":13,"hicol":19},"name":"cmd","attrs":[],"inner":{"variant":"StructFieldItem","fields":[{"variant":"TypedStructField","fields":[{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"String","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":3,"index":{"_field0":3581}},false]}]}]},"visibility":"Public","def_id":{"krate":0,"index":{"_field0":14}},"stability":null},{"source":{"filename":"src/process.rs","loline":14,"locol":4,"hiline":14,"hicol":19},"name":"exe","attrs":[],"inner":{"variant":"StructFieldItem","fields":[{"variant":"TypedStructField","fields":[{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"String","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":3,"index":{"_field0":3581}},false]}]}]},"visibility":"Public","def_id":{"krate":0,"index":{"_field0":15}},"stability":null},{"source":{"filename":"src/process.rs","loline":15,"locol":4,"hiline":15,"hicol":16},"name":"pid","attrs":[],"inner":{"variant":"StructFieldItem","fields":[{"variant":"TypedStructField","fields":[{"variant":"Primitive","fields":["I64"]}]}]},"visibility":"Public","def_id":{"krate":0,"index":{"_field0":16}},"stability":null},{"source":{"filename":"src/process.rs","loline":16,"locol":4,"hiline":16,"hicol":28},"name":"environ","attrs":[],"inner":{"variant":"StructFieldItem","fields":[{"variant":"TypedStructField","fields":[{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"Vec","params":{"variant":"AngleBracketed","fields":[[],[{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"String","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":3,"index":{"_field0":3581}},false]}],[]]}}]},null,{"krate":3,"index":{"_field0":4100}},false]}]}]},"visibility":"Public","def_id":{"krate":0,"index":{"_field0":17}},"stability":null},{"source":{"filename":"src/process.rs","loline":17,"locol":4,"hiline":17,"hicol":19},"name":"cwd","attrs":[],"inner":{"variant":"StructFieldItem","fields":[{"variant":"TypedStructField","fields":[{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"String","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":3,"index":{"_field0":3581}},false]}]}]},"visibility":"Public","def_id":{"krate":0,"index":{"_field0":18}},"stability":null},{"source":{"filename":"src/process.rs","loline":18,"locol":4,"hiline":18,"hicol":20},"name":"root","attrs":[],"inner":{"variant":"StructFieldItem","fields":[{"variant":"TypedStructField","fields":[{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"String","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":3,"index":{"_field0":3581}},false]}]}]},"visibility":"Public","def_id":{"krate":0,"index":{"_field0":19}},"stability":null},{"source":{"filename":"src/process.rs","loline":19,"locol":4,"hiline":19,"hicol":19},"name":"memory","attrs":[],"inner":{"variant":"StructFieldItem","fields":[{"variant":"TypedStructField","fields":[{"variant":"Primitive","fields":["U64"]}]}]},"visibility":"Public","def_id":{"krate":0,"index":{"_field0":20}},"stability":null},{"source":{"filename":"src/process.rs","loline":20,"locol":4,"hiline":20,"hicol":14},"name":"utime","attrs":[],"inner":{"variant":"StructFieldItem","fields":["HiddenStructField"]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":21}},"stability":null},{"source":{"filename":"src/process.rs","loline":21,"locol":4,"hiline":21,"hicol":14},"name":"stime","attrs":[],"inner":{"variant":"StructFieldItem","fields":["HiddenStructField"]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":22}},"stability":null},{"source":{"filename":"src/process.rs","loline":22,"locol":4,"hiline":22,"hicol":18},"name":"old_utime","attrs":[],"inner":{"variant":"StructFieldItem","fields":["HiddenStructField"]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":23}},"stability":null},{"source":{"filename":"src/process.rs","loline":23,"locol":4,"hiline":23,"hicol":18},"name":"old_stime","attrs":[],"inner":{"variant":"StructFieldItem","fields":["HiddenStructField"]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":24}},"stability":null},{"source":{"filename":"src/process.rs","loline":24,"locol":4,"hiline":24,"hicol":19},"name":"start_time","attrs":[],"inner":{"variant":"StructFieldItem","fields":["HiddenStructField"]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":25}},"stability":null},{"source":{"filename":"src/process.rs","loline":25,"locol":4,"hiline":25,"hicol":17},"name":"updated","attrs":[],"inner":{"variant":"StructFieldItem","fields":["HiddenStructField"]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":26}},"stability":null},{"source":{"filename":"src/process.rs","loline":26,"locol":4,"hiline":26,"hicol":22},"name":"cpu_usage","attrs":[],"inner":{"variant":"StructFieldItem","fields":[{"variant":"TypedStructField","fields":[{"variant":"Primitive","fields":["F32"]}]}]},"visibility":"Public","def_id":{"krate":0,"index":{"_field0":27}},"stability":null}],"fields_stripped":false}]},"visibility":"Public","def_id":{"krate":0,"index":{"_field0":12}},"stability":null},{"source":{"filename":"src/process.rs","loline":73,"locol":0,"hiline":79,"hicol":1},"name":"set_time","attrs":[],"inner":{"variant":"FunctionItem","fields":[{"decl":{"inputs":{"values":[{"type_":{"variant":"BorrowedRef","fields":[null,"Mutable",{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"Process","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":0,"index":{"_field0":12}},false]}]},"name":"p","id":569},{"type_":{"variant":"Primitive","fields":["U64"]},"name":"utime","id":573},{"type_":{"variant":"Primitive","fields":["U64"]},"name":"stime","id":576}]},"output":"DefaultReturn","variadic":false,"attrs":[]},"generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"unsafety":"Normal","constness":"NotConst","abi":"Rust"}]},"visibility":"Public","def_id":{"krate":0,"index":{"_field0":79}},"stability":null},{"source":{"filename":"src/process.rs","loline":81,"locol":0,"hiline":84,"hicol":1},"name":"compute_cpu_usage","attrs":[],"inner":{"variant":"FunctionItem","fields":[{"decl":{"inputs":{"values":[{"type_":{"variant":"BorrowedRef","fields":[null,"Mutable",{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"Process","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":0,"index":{"_field0":12}},false]}]},"name":"p","id":609},{"type_":{"variant":"Primitive","fields":["U64"]},"name":"nb_processors","id":613},{"type_":{"variant":"Primitive","fields":["F32"]},"name":"total_time","id":616}]},"output":"DefaultReturn","variadic":false,"attrs":[]},"generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"unsafety":"Normal","constness":"NotConst","abi":"Rust"}]},"visibility":"Public","def_id":{"krate":0,"index":{"_field0":83}},"stability":null},{"source":{"filename":"src/process.rs","loline":86,"locol":0,"hiline":88,"hicol":1},"name":"has_been_updated","attrs":[],"inner":{"variant":"FunctionItem","fields":[{"decl":{"inputs":{"values":[{"type_":{"variant":"BorrowedRef","fields":[null,"Immutable",{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"Process","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":0,"index":{"_field0":12}},false]}]},"name":"p","id":652}]},"output":{"variant":"Return","fields":[{"variant":"Primitive","fields":["Bool"]}]},"variadic":false,"attrs":[]},"generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"unsafety":"Normal","constness":"NotConst","abi":"Rust"}]},"visibility":"Public","def_id":{"krate":0,"index":{"_field0":87}},"stability":null},{"source":{"filename":"src/process.rs","loline":10,"locol":9,"hiline":10,"hicol":14},"name":null,"attrs":[{"variant":"Word","fields":["automatically_derived"]},{"variant":"List","fields":["allow",[{"variant":"Word","fields":["unused_qualifications"]}]]}],"inner":{"variant":"ImplItem","fields":[{"unsafety":"Normal","generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"trait_":{"variant":"ResolvedPath","fields":[{"global":true,"segments":[{"name":"std","params":{"variant":"AngleBracketed","fields":[[],[],[]]}},{"name":"clone","params":{"variant":"AngleBracketed","fields":[[],[],[]]}},{"name":"Clone","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":2,"index":{"_field0":21714}},false]},"for_":{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"Process","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":0,"index":{"_field0":12}},false]},"items":[{"source":{"filename":"src/process.rs","loline":10,"locol":9,"hiline":10,"hicol":14},"name":"clone","attrs":[{"variant":"Word","fields":["inline"]}],"inner":{"variant":"MethodItem","fields":[{"generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"self_":{"variant":"SelfBorrowed","fields":[null,"Immutable"]},"unsafety":"Normal","constness":"NotConst","decl":{"inputs":{"values":[]},"output":{"variant":"Return","fields":[{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"Process","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":0,"index":{"_field0":12}},false]}]},"variadic":false,"attrs":[]},"abi":"Rust"}]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":29}},"stability":{"level":"Stable","feature":"rust1","since":"1.0.0","deprecated_since":"","reason":"","issue":null}}],"derived":true,"polarity":"Positive"}]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":28}},"stability":{"level":"Stable","feature":"rust1","since":"1.0.0","deprecated_since":"","reason":"","issue":null}},{"source":{"filename":"src/process.rs","loline":29,"locol":0,"hiline":53,"hicol":1},"name":null,"attrs":[],"inner":{"variant":"ImplItem","fields":[{"unsafety":"Normal","generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"trait_":null,"for_":{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"Process","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":0,"index":{"_field0":12}},false]},"items":[{"source":{"filename":"src/process.rs","loline":30,"locol":4,"hiline":48,"hicol":5},"name":"new","attrs":[],"inner":{"variant":"MethodItem","fields":[{"generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"self_":"SelfStatic","unsafety":"Normal","constness":"NotConst","decl":{"inputs":{"values":[{"type_":{"variant":"Primitive","fields":["I64"]},"name":"pid","id":174},{"type_":{"variant":"Primitive","fields":["U64"]},"name":"start_time","id":177}]},"output":{"variant":"Return","fields":[{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"Process","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":0,"index":{"_field0":12}},false]}]},"variadic":false,"attrs":[]},"abi":"Rust"}]},"visibility":"Public","def_id":{"krate":0,"index":{"_field0":47}},"stability":null},{"source":{"filename":"src/process.rs","loline":50,"locol":4,"hiline":52,"hicol":5},"name":"kill","attrs":[],"inner":{"variant":"MethodItem","fields":[{"generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"self_":{"variant":"SelfBorrowed","fields":[null,"Immutable"]},"unsafety":"Normal","constness":"NotConst","decl":{"inputs":{"values":[{"type_":{"variant":"ResolvedPath","fields":[{"global":true,"segments":[{"name":"Signal","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":0,"index":{"_field0":356}},false]},"name":"signal","id":209}]},"output":{"variant":"Return","fields":[{"variant":"Primitive","fields":["Bool"]}]},"variadic":false,"attrs":[]},"abi":"Rust"}]},"visibility":"Public","def_id":{"krate":0,"index":{"_field0":50}},"stability":null}],"derived":false,"polarity":"Positive"}]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":46}},"stability":null},{"source":{"filename":"src/process.rs","loline":56,"locol":0,"hiline":71,"hicol":1},"name":null,"attrs":[{"variant":"List","fields":["allow",[{"variant":"Word","fields":["unused_must_use"]}]]}],"inner":{"variant":"ImplItem","fields":[{"unsafety":"Normal","generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"trait_":{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"Debug","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":2,"index":{"_field0":34846}},false]},"for_":{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"Process","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":0,"index":{"_field0":12}},false]},"items":[{"source":{"filename":"src/process.rs","loline":57,"locol":4,"hiline":70,"hicol":5},"name":"fmt","attrs":[],"inner":{"variant":"MethodItem","fields":[{"generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"self_":{"variant":"SelfBorrowed","fields":[null,"Immutable"]},"unsafety":"Normal","constness":"NotConst","decl":{"inputs":{"values":[{"type_":{"variant":"BorrowedRef","fields":[null,"Mutable",{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"Formatter","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":2,"index":{"_field0":34765}},false]}]},"name":"f","id":235}]},"output":{"variant":"Return","fields":[{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"fmt","params":{"variant":"AngleBracketed","fields":[[],[],[]]}},{"name":"Result","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":2,"index":{"_field0":34715}},false]}]},"variadic":false,"attrs":[]},"abi":"Rust"}]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":54}},"stability":{"level":"Stable","feature":"rust1","since":"1.0.0","deprecated_since":"","reason":"","issue":null}}],"derived":false,"polarity":"Positive"}]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":53}},"stability":{"level":"Stable","feature":"rust1","since":"1.0.0","deprecated_since":"","reason":"","issue":null}}],"is_crate":false}]},"visibility":"Public","def_id":{"krate":0,"index":{"_field0":8}},"stability":null},{"source":{"filename":"src/processor.rs","loline":7,"locol":0,"hiline":161,"hicol":1},"name":"processor","attrs":[],"inner":{"variant":"ModuleItem","fields":[{"items":[{"source":{"filename":"src/processor.rs","loline":10,"locol":0,"hiline":21,"hicol":1},"name":"CpuValues","attrs":[],"inner":{"variant":"StructItem","fields":[{"struct_type":"Plain","generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"fields":[{"source":{"filename":"src/processor.rs","loline":11,"locol":4,"hiline":11,"hicol":13},"name":"user","attrs":[],"inner":{"variant":"StructFieldItem","fields":["HiddenStructField"]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":93}},"stability":null},{"source":{"filename":"src/processor.rs","loline":12,"locol":4,"hiline":12,"hicol":13},"name":"nice","attrs":[],"inner":{"variant":"StructFieldItem","fields":["HiddenStructField"]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":94}},"stability":null},{"source":{"filename":"src/processor.rs","loline":13,"locol":4,"hiline":13,"hicol":15},"name":"system","attrs":[],"inner":{"variant":"StructFieldItem","fields":["HiddenStructField"]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":95}},"stability":null},{"source":{"filename":"src/processor.rs","loline":14,"locol":4,"hiline":14,"hicol":13},"name":"idle","attrs":[],"inner":{"variant":"StructFieldItem","fields":["HiddenStructField"]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":96}},"stability":null},{"source":{"filename":"src/processor.rs","loline":15,"locol":4,"hiline":15,"hicol":15},"name":"iowait","attrs":[],"inner":{"variant":"StructFieldItem","fields":["HiddenStructField"]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":97}},"stability":null},{"source":{"filename":"src/processor.rs","loline":16,"locol":4,"hiline":16,"hicol":12},"name":"irq","attrs":[],"inner":{"variant":"StructFieldItem","fields":["HiddenStructField"]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":98}},"stability":null},{"source":{"filename":"src/processor.rs","loline":17,"locol":4,"hiline":17,"hicol":16},"name":"softirq","attrs":[],"inner":{"variant":"StructFieldItem","fields":["HiddenStructField"]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":99}},"stability":null},{"source":{"filename":"src/processor.rs","loline":18,"locol":4,"hiline":18,"hicol":14},"name":"steal","attrs":[],"inner":{"variant":"StructFieldItem","fields":["HiddenStructField"]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":100}},"stability":null},{"source":{"filename":"src/processor.rs","loline":19,"locol":4,"hiline":19,"hicol":14},"name":"guest","attrs":[],"inner":{"variant":"StructFieldItem","fields":["HiddenStructField"]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":101}},"stability":null},{"source":{"filename":"src/processor.rs","loline":20,"locol":4,"hiline":20,"hicol":19},"name":"guest_nice","attrs":[],"inner":{"variant":"StructFieldItem","fields":["HiddenStructField"]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":102}},"stability":null}],"fields_stripped":false}]},"visibility":"Public","def_id":{"krate":0,"index":{"_field0":92}},"stability":null},{"source":{"filename":"src/processor.rs","loline":85,"locol":0,"hiline":92,"hicol":1},"name":"Processor","attrs":[],"inner":{"variant":"StructItem","fields":[{"struct_type":"Plain","generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"fields":[{"source":{"filename":"src/processor.rs","loline":86,"locol":4,"hiline":86,"hicol":25},"name":"old_values","attrs":[],"inner":{"variant":"StructFieldItem","fields":["HiddenStructField"]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":149}},"stability":null},{"source":{"filename":"src/processor.rs","loline":87,"locol":4,"hiline":87,"hicol":25},"name":"new_values","attrs":[],"inner":{"variant":"StructFieldItem","fields":["HiddenStructField"]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":150}},"stability":null},{"source":{"filename":"src/processor.rs","loline":88,"locol":4,"hiline":88,"hicol":16},"name":"name","attrs":[],"inner":{"variant":"StructFieldItem","fields":["HiddenStructField"]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":151}},"stability":null},{"source":{"filename":"src/processor.rs","loline":89,"locol":4,"hiline":89,"hicol":18},"name":"cpu_usage","attrs":[],"inner":{"variant":"StructFieldItem","fields":["HiddenStructField"]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":152}},"stability":null},{"source":{"filename":"src/processor.rs","loline":90,"locol":4,"hiline":90,"hicol":19},"name":"total_time","attrs":[],"inner":{"variant":"StructFieldItem","fields":["HiddenStructField"]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":153}},"stability":null},{"source":{"filename":"src/processor.rs","loline":91,"locol":4,"hiline":91,"hicol":23},"name":"old_total_time","attrs":[],"inner":{"variant":"StructFieldItem","fields":["HiddenStructField"]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":154}},"stability":null}],"fields_stripped":false}]},"visibility":"Public","def_id":{"krate":0,"index":{"_field0":148}},"stability":null},{"source":{"filename":"src/processor.rs","loline":147,"locol":0,"hiline":151,"hicol":1},"name":"new_processor","attrs":[],"inner":{"variant":"FunctionItem","fields":[{"decl":{"inputs":{"values":[{"type_":{"variant":"BorrowedRef","fields":[null,"Immutable",{"variant":"Primitive","fields":["Str"]}]},"name":"name","id":1295},{"type_":{"variant":"Primitive","fields":["U64"]},"name":"user","id":1299},{"type_":{"variant":"Primitive","fields":["U64"]},"name":"nice","id":1302},{"type_":{"variant":"Primitive","fields":["U64"]},"name":"system","id":1305},{"type_":{"variant":"Primitive","fields":["U64"]},"name":"idle","id":1308},{"type_":{"variant":"Primitive","fields":["U64"]},"name":"iowait","id":1311},{"type_":{"variant":"Primitive","fields":["U64"]},"name":"irq","id":1314},{"type_":{"variant":"Primitive","fields":["U64"]},"name":"softirq","id":1317},{"type_":{"variant":"Primitive","fields":["U64"]},"name":"steal","id":1320},{"type_":{"variant":"Primitive","fields":["U64"]},"name":"guest","id":1323},{"type_":{"variant":"Primitive","fields":["U64"]},"name":"guest_nice","id":1326}]},"output":{"variant":"Return","fields":[{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"Processor","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":0,"index":{"_field0":148}},false]}]},"variadic":false,"attrs":[]},"generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"unsafety":"Normal","constness":"NotConst","abi":"Rust"}]},"visibility":"Public","def_id":{"krate":0,"index":{"_field0":193}},"stability":null},{"source":{"filename":"src/processor.rs","loline":153,"locol":0,"hiline":157,"hicol":1},"name":"set_processor","attrs":[],"inner":{"variant":"FunctionItem","fields":[{"decl":{"inputs":{"values":[{"type_":{"variant":"BorrowedRef","fields":[null,"Mutable",{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"Processor","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":0,"index":{"_field0":148}},false]}]},"name":"p","id":1346},{"type_":{"variant":"Primitive","fields":["U64"]},"name":"user","id":1350},{"type_":{"variant":"Primitive","fields":["U64"]},"name":"nice","id":1353},{"type_":{"variant":"Primitive","fields":["U64"]},"name":"system","id":1356},{"type_":{"variant":"Primitive","fields":["U64"]},"name":"idle","id":1359},{"type_":{"variant":"Primitive","fields":["U64"]},"name":"iowait","id":1362},{"type_":{"variant":"Primitive","fields":["U64"]},"name":"irq","id":1365},{"type_":{"variant":"Primitive","fields":["U64"]},"name":"softirq","id":1368},{"type_":{"variant":"Primitive","fields":["U64"]},"name":"steal","id":1371},{"type_":{"variant":"Primitive","fields":["U64"]},"name":"guest","id":1374},{"type_":{"variant":"Primitive","fields":["U64"]},"name":"guest_nice","id":1377}]},"output":"DefaultReturn","variadic":false,"attrs":[]},"generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"unsafety":"Normal","constness":"NotConst","abi":"Rust"}]},"visibility":"Public","def_id":{"krate":0,"index":{"_field0":205}},"stability":null},{"source":{"filename":"src/processor.rs","loline":159,"locol":0,"hiline":161,"hicol":1},"name":"get_raw_times","attrs":[],"inner":{"variant":"FunctionItem","fields":[{"decl":{"inputs":{"values":[{"type_":{"variant":"BorrowedRef","fields":[null,"Immutable",{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"Processor","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":0,"index":{"_field0":148}},false]}]},"name":"p","id":1395}]},"output":{"variant":"Return","fields":[{"variant":"Tuple","fields":[[{"variant":"Primitive","fields":["U64"]},{"variant":"Primitive","fields":["U64"]}]]}]},"variadic":false,"attrs":[]},"generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"unsafety":"Normal","constness":"NotConst","abi":"Rust"}]},"visibility":"Public","def_id":{"krate":0,"index":{"_field0":217}},"stability":null},{"source":{"filename":"src/processor.rs","loline":9,"locol":16,"hiline":9,"hicol":20},"name":null,"attrs":[{"variant":"Word","fields":["automatically_derived"]},{"variant":"List","fields":["allow",[{"variant":"Word","fields":["unused_qualifications"]}]]}],"inner":{"variant":"ImplItem","fields":[{"unsafety":"Normal","generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"trait_":{"variant":"ResolvedPath","fields":[{"global":true,"segments":[{"name":"std","params":{"variant":"AngleBracketed","fields":[[],[],[]]}},{"name":"marker","params":{"variant":"AngleBracketed","fields":[[],[],[]]}},{"name":"Copy","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":2,"index":{"_field0":12303}},false]},"for_":{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"CpuValues","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":0,"index":{"_field0":92}},false]},"items":[],"derived":true,"polarity":"Positive"}]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":103}},"stability":{"level":"Stable","feature":"rust1","since":"1.0.0","deprecated_since":"","reason":"","issue":null}},{"source":{"filename":"src/processor.rs","loline":9,"locol":9,"hiline":9,"hicol":14},"name":null,"attrs":[{"variant":"Word","fields":["automatically_derived"]},{"variant":"List","fields":["allow",[{"variant":"Word","fields":["unused_qualifications"]}]]}],"inner":{"variant":"ImplItem","fields":[{"unsafety":"Normal","generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"trait_":{"variant":"ResolvedPath","fields":[{"global":true,"segments":[{"name":"std","params":{"variant":"AngleBracketed","fields":[[],[],[]]}},{"name":"clone","params":{"variant":"AngleBracketed","fields":[[],[],[]]}},{"name":"Clone","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":2,"index":{"_field0":21714}},false]},"for_":{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"CpuValues","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":0,"index":{"_field0":92}},false]},"items":[{"source":{"filename":"src/processor.rs","loline":9,"locol":9,"hiline":9,"hicol":14},"name":"clone","attrs":[{"variant":"Word","fields":["inline"]}],"inner":{"variant":"MethodItem","fields":[{"generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"self_":{"variant":"SelfBorrowed","fields":[null,"Immutable"]},"unsafety":"Normal","constness":"NotConst","decl":{"inputs":{"values":[]},"output":{"variant":"Return","fields":[{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"CpuValues","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":0,"index":{"_field0":92}},false]}]},"variadic":false,"attrs":[]},"abi":"Rust"}]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":105}},"stability":{"level":"Stable","feature":"rust1","since":"1.0.0","deprecated_since":"","reason":"","issue":null}}],"derived":true,"polarity":"Positive"}]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":104}},"stability":{"level":"Stable","feature":"rust1","since":"1.0.0","deprecated_since":"","reason":"","issue":null}},{"source":{"filename":"src/processor.rs","loline":23,"locol":0,"hiline":83,"hicol":1},"name":null,"attrs":[],"inner":{"variant":"ImplItem","fields":[{"unsafety":"Normal","generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"trait_":null,"for_":{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"CpuValues","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":0,"index":{"_field0":92}},false]},"items":[{"source":{"filename":"src/processor.rs","loline":24,"locol":4,"hiline":37,"hicol":5},"name":"new","attrs":[],"inner":{"variant":"MethodItem","fields":[{"generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"self_":"SelfStatic","unsafety":"Normal","constness":"NotConst","decl":{"inputs":{"values":[]},"output":{"variant":"Return","fields":[{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"CpuValues","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":0,"index":{"_field0":92}},false]}]},"variadic":false,"attrs":[]},"abi":"Rust"}]},"visibility":"Public","def_id":{"krate":0,"index":{"_field0":118}},"stability":null},{"source":{"filename":"src/processor.rs","loline":39,"locol":4,"hiline":53,"hicol":5},"name":"new_with_values","attrs":[],"inner":{"variant":"MethodItem","fields":[{"generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"self_":"SelfStatic","unsafety":"Normal","constness":"NotConst","decl":{"inputs":{"values":[{"type_":{"variant":"Primitive","fields":["U64"]},"name":"user","id":798},{"type_":{"variant":"Primitive","fields":["U64"]},"name":"nice","id":801},{"type_":{"variant":"Primitive","fields":["U64"]},"name":"system","id":804},{"type_":{"variant":"Primitive","fields":["U64"]},"name":"idle","id":807},{"type_":{"variant":"Primitive","fields":["U64"]},"name":"iowait","id":810},{"type_":{"variant":"Primitive","fields":["U64"]},"name":"irq","id":813},{"type_":{"variant":"Primitive","fields":["U64"]},"name":"softirq","id":816},{"type_":{"variant":"Primitive","fields":["U64"]},"name":"steal","id":819},{"type_":{"variant":"Primitive","fields":["U64"]},"name":"guest","id":822},{"type_":{"variant":"Primitive","fields":["U64"]},"name":"guest_nice","id":825}]},"output":{"variant":"Return","fields":[{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"CpuValues","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":0,"index":{"_field0":92}},false]}]},"variadic":false,"attrs":[]},"abi":"Rust"}]},"visibility":"Public","def_id":{"krate":0,"index":{"_field0":119}},"stability":null},{"source":{"filename":"src/processor.rs","loline":55,"locol":4,"hiline":59,"hicol":5},"name":"is_zero","attrs":[],"inner":{"variant":"MethodItem","fields":[{"generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"self_":{"variant":"SelfBorrowed","fields":[null,"Immutable"]},"unsafety":"Normal","constness":"NotConst","decl":{"inputs":{"values":[]},"output":{"variant":"Return","fields":[{"variant":"Primitive","fields":["Bool"]}]},"variadic":false,"attrs":[]},"abi":"Rust"}]},"visibility":"Public","def_id":{"krate":0,"index":{"_field0":130}},"stability":null},{"source":{"filename":"src/processor.rs","loline":61,"locol":4,"hiline":73,"hicol":5},"name":"set","attrs":[],"inner":{"variant":"MethodItem","fields":[{"generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"self_":{"variant":"SelfBorrowed","fields":[null,"Mutable"]},"unsafety":"Normal","constness":"NotConst","decl":{"inputs":{"values":[{"type_":{"variant":"Primitive","fields":["U64"]},"name":"user","id":902},{"type_":{"variant":"Primitive","fields":["U64"]},"name":"nice","id":905},{"type_":{"variant":"Primitive","fields":["U64"]},"name":"system","id":908},{"type_":{"variant":"Primitive","fields":["U64"]},"name":"idle","id":911},{"type_":{"variant":"Primitive","fields":["U64"]},"name":"iowait","id":914},{"type_":{"variant":"Primitive","fields":["U64"]},"name":"irq","id":917},{"type_":{"variant":"Primitive","fields":["U64"]},"name":"softirq","id":920},{"type_":{"variant":"Primitive","fields":["U64"]},"name":"steal","id":923},{"type_":{"variant":"Primitive","fields":["U64"]},"name":"guest","id":926},{"type_":{"variant":"Primitive","fields":["U64"]},"name":"guest_nice","id":929}]},"output":"DefaultReturn","variadic":false,"attrs":[]},"abi":"Rust"}]},"visibility":"Public","def_id":{"krate":0,"index":{"_field0":132}},"stability":null},{"source":{"filename":"src/processor.rs","loline":75,"locol":4,"hiline":77,"hicol":5},"name":"work_time","attrs":[],"inner":{"variant":"MethodItem","fields":[{"generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"self_":{"variant":"SelfBorrowed","fields":[null,"Immutable"]},"unsafety":"Normal","constness":"NotConst","decl":{"inputs":{"values":[]},"output":{"variant":"Return","fields":[{"variant":"Primitive","fields":["U64"]}]},"variadic":false,"attrs":[]},"abi":"Rust"}]},"visibility":"Public","def_id":{"krate":0,"index":{"_field0":144}},"stability":null},{"source":{"filename":"src/processor.rs","loline":79,"locol":4,"hiline":82,"hicol":5},"name":"total_time","attrs":[],"inner":{"variant":"MethodItem","fields":[{"generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"self_":{"variant":"SelfBorrowed","fields":[null,"Immutable"]},"unsafety":"Normal","constness":"NotConst","decl":{"inputs":{"values":[]},"output":{"variant":"Return","fields":[{"variant":"Primitive","fields":["U64"]}]},"variadic":false,"attrs":[]},"abi":"Rust"}]},"visibility":"Public","def_id":{"krate":0,"index":{"_field0":146}},"stability":null}],"derived":false,"polarity":"Positive"}]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":117}},"stability":null},{"source":{"filename":"src/processor.rs","loline":94,"locol":0,"hiline":139,"hicol":1},"name":null,"attrs":[],"inner":{"variant":"ImplItem","fields":[{"unsafety":"Normal","generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"trait_":null,"for_":{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"Processor","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":0,"index":{"_field0":148}},false]},"items":[{"source":{"filename":"src/processor.rs","loline":132,"locol":4,"hiline":134,"hicol":5},"name":"get_cpu_usage","attrs":[],"inner":{"variant":"MethodItem","fields":[{"generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"self_":{"variant":"SelfBorrowed","fields":[null,"Immutable"]},"unsafety":"Normal","constness":"NotConst","decl":{"inputs":{"values":[]},"output":{"variant":"Return","fields":[{"variant":"Primitive","fields":["F32"]}]},"variadic":false,"attrs":[]},"abi":"Rust"}]},"visibility":"Public","def_id":{"krate":0,"index":{"_field0":181}},"stability":null},{"source":{"filename":"src/processor.rs","loline":136,"locol":4,"hiline":138,"hicol":5},"name":"get_name","attrs":[],"inner":{"variant":"MethodItem","fields":[{"generics":{"lifetimes":[{"_field0":"'a"}],"type_params":[],"where_predicates":[]},"self_":{"variant":"SelfBorrowed","fields":[{"_field0":"'a"},"Immutable"]},"unsafety":"Normal","constness":"NotConst","decl":{"inputs":{"values":[]},"output":{"variant":"Return","fields":[{"variant":"BorrowedRef","fields":[{"_field0":"'a"},"Immutable",{"variant":"Primitive","fields":["Str"]}]}]},"variadic":false,"attrs":[]},"abi":"Rust"}]},"visibility":"Public","def_id":{"krate":0,"index":{"_field0":183}},"stability":null}],"derived":false,"polarity":"Positive"}]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":155}},"stability":null},{"source":{"filename":"src/processor.rs","loline":141,"locol":0,"hiline":145,"hicol":1},"name":null,"attrs":[],"inner":{"variant":"ImplItem","fields":[{"unsafety":"Normal","generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"trait_":{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"Debug","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":2,"index":{"_field0":34846}},false]},"for_":{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"Processor","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":0,"index":{"_field0":148}},false]},"items":[{"source":{"filename":"src/processor.rs","loline":142,"locol":4,"hiline":144,"hicol":5},"name":"fmt","attrs":[],"inner":{"variant":"MethodItem","fields":[{"generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"self_":{"variant":"SelfBorrowed","fields":[null,"Immutable"]},"unsafety":"Normal","constness":"NotConst","decl":{"inputs":{"values":[{"type_":{"variant":"BorrowedRef","fields":[null,"Mutable",{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"Formatter","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":2,"index":{"_field0":34765}},false]}]},"name":"f","id":1244}]},"output":{"variant":"Return","fields":[{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"fmt","params":{"variant":"AngleBracketed","fields":[[],[],[]]}},{"name":"Result","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":2,"index":{"_field0":34715}},false]}]},"variadic":false,"attrs":[]},"abi":"Rust"}]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":187}},"stability":{"level":"Stable","feature":"rust1","since":"1.0.0","deprecated_since":"","reason":"","issue":null}}],"derived":false,"polarity":"Positive"}]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":186}},"stability":{"level":"Stable","feature":"rust1","since":"1.0.0","deprecated_since":"","reason":"","issue":null}}],"is_crate":false}]},"visibility":"Public","def_id":{"krate":0,"index":{"_field0":89}},"stability":null},{"source":{"filename":"src/system.rs","loline":7,"locol":0,"hiline":305,"hicol":1},"name":"system","attrs":[],"inner":{"variant":"ModuleItem","fields":[{"items":[{"source":{"filename":"src/system.rs","loline":18,"locol":0,"hiline":26,"hicol":1},"name":"System","attrs":[],"inner":{"variant":"StructItem","fields":[{"struct_type":"Plain","generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"fields":[{"source":{"filename":"src/system.rs","loline":19,"locol":4,"hiline":19,"hicol":41},"name":"process_list","attrs":[],"inner":{"variant":"StructFieldItem","fields":["HiddenStructField"]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":232}},"stability":null},{"source":{"filename":"src/system.rs","loline":20,"locol":4,"hiline":20,"hicol":18},"name":"mem_total","attrs":[],"inner":{"variant":"StructFieldItem","fields":["HiddenStructField"]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":233}},"stability":null},{"source":{"filename":"src/system.rs","loline":21,"locol":4,"hiline":21,"hicol":17},"name":"mem_used","attrs":[],"inner":{"variant":"StructFieldItem","fields":["HiddenStructField"]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":234}},"stability":null},{"source":{"filename":"src/system.rs","loline":22,"locol":4,"hiline":22,"hicol":19},"name":"swap_total","attrs":[],"inner":{"variant":"StructFieldItem","fields":["HiddenStructField"]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":235}},"stability":null},{"source":{"filename":"src/system.rs","loline":23,"locol":4,"hiline":23,"hicol":18},"name":"swap_free","attrs":[],"inner":{"variant":"StructFieldItem","fields":["HiddenStructField"]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":236}},"stability":null},{"source":{"filename":"src/system.rs","loline":24,"locol":4,"hiline":24,"hicol":30},"name":"processors","attrs":[],"inner":{"variant":"StructFieldItem","fields":["HiddenStructField"]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":237}},"stability":null},{"source":{"filename":"src/system.rs","loline":25,"locol":4,"hiline":25,"hicol":21},"name":"page_size_kb","attrs":[],"inner":{"variant":"StructFieldItem","fields":["HiddenStructField"]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":238}},"stability":null}],"fields_stripped":false}]},"visibility":"Public","def_id":{"krate":0,"index":{"_field0":231}},"stability":null},{"source":{"filename":"src/system.rs","loline":28,"locol":0,"hiline":185,"hicol":1},"name":null,"attrs":[],"inner":{"variant":"ImplItem","fields":[{"unsafety":"Normal","generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"trait_":null,"for_":{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"System","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":0,"index":{"_field0":231}},false]},"items":[{"source":{"filename":"src/system.rs","loline":29,"locol":4,"hiline":42,"hicol":5},"name":"new","attrs":[],"inner":{"variant":"MethodItem","fields":[{"generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"self_":"SelfStatic","unsafety":"Normal","constness":"NotConst","decl":{"inputs":{"values":[]},"output":{"variant":"Return","fields":[{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"System","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":0,"index":{"_field0":231}},false]}]},"variadic":false,"attrs":[]},"abi":"Rust"}]},"visibility":"Public","def_id":{"krate":0,"index":{"_field0":240}},"stability":null},{"source":{"filename":"src/system.rs","loline":44,"locol":4,"hiline":109,"hicol":5},"name":"refresh_system","attrs":[],"inner":{"variant":"MethodItem","fields":[{"generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"self_":{"variant":"SelfBorrowed","fields":[null,"Mutable"]},"unsafety":"Normal","constness":"NotConst","decl":{"inputs":{"values":[]},"output":"DefaultReturn","variadic":false,"attrs":[]},"abi":"Rust"}]},"visibility":"Public","def_id":{"krate":0,"index":{"_field0":242}},"stability":null},{"source":{"filename":"src/system.rs","loline":111,"locol":4,"hiline":149,"hicol":5},"name":"refresh_process","attrs":[],"inner":{"variant":"MethodItem","fields":[{"generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"self_":{"variant":"SelfBorrowed","fields":[null,"Mutable"]},"unsafety":"Normal","constness":"NotConst","decl":{"inputs":{"values":[]},"output":"DefaultReturn","variadic":false,"attrs":[]},"abi":"Rust"}]},"visibility":"Public","def_id":{"krate":0,"index":{"_field0":267}},"stability":null},{"source":{"filename":"src/system.rs","loline":151,"locol":4,"hiline":154,"hicol":5},"name":"refresh_all","attrs":[],"inner":{"variant":"MethodItem","fields":[{"generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"self_":{"variant":"SelfBorrowed","fields":[null,"Mutable"]},"unsafety":"Normal","constness":"NotConst","decl":{"inputs":{"values":[]},"output":"DefaultReturn","variadic":false,"attrs":[]},"abi":"Rust"}]},"visibility":"Public","def_id":{"krate":0,"index":{"_field0":287}},"stability":null},{"source":{"filename":"src/system.rs","loline":156,"locol":4,"hiline":158,"hicol":5},"name":"get_process_list","attrs":[],"inner":{"variant":"MethodItem","fields":[{"generics":{"lifetimes":[{"_field0":"'a"}],"type_params":[],"where_predicates":[]},"self_":{"variant":"SelfBorrowed","fields":[{"_field0":"'a"},"Immutable"]},"unsafety":"Normal","constness":"NotConst","decl":{"inputs":{"values":[]},"output":{"variant":"Return","fields":[{"variant":"BorrowedRef","fields":[{"_field0":"'a"},"Immutable",{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"HashMap","params":{"variant":"AngleBracketed","fields":[[],[{"variant":"Primitive","fields":["Usize"]},{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"Process","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":0,"index":{"_field0":12}},false]}],[]]}}]},null,{"krate":1,"index":{"_field0":1646}},false]}]}]},"variadic":false,"attrs":[]},"abi":"Rust"}]},"visibility":"Public","def_id":{"krate":0,"index":{"_field0":289}},"stability":null},{"source":{"filename":"src/system.rs","loline":160,"locol":4,"hiline":162,"hicol":5},"name":"get_process","attrs":[],"inner":{"variant":"MethodItem","fields":[{"generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"self_":{"variant":"SelfBorrowed","fields":[null,"Immutable"]},"unsafety":"Normal","constness":"NotConst","decl":{"inputs":{"values":[{"type_":{"variant":"Primitive","fields":["I64"]},"name":"pid","id":2029}]},"output":{"variant":"Return","fields":[{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"Option","params":{"variant":"AngleBracketed","fields":[[],[{"variant":"BorrowedRef","fields":[null,"Immutable",{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"Process","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":0,"index":{"_field0":12}},false]}]}],[]]}}]},null,{"krate":2,"index":{"_field0":29010}},false]}]},"variadic":false,"attrs":[]},"abi":"Rust"}]},"visibility":"Public","def_id":{"krate":0,"index":{"_field0":292}},"stability":null},{"source":{"filename":"src/system.rs","loline":165,"locol":4,"hiline":167,"hicol":5},"name":"get_processor_list","attrs":[{"variant":"NameValue","fields":["doc","The first process in the array is the \"main\" process"]}],"inner":{"variant":"MethodItem","fields":[{"generics":{"lifetimes":[{"_field0":"'a"}],"type_params":[],"where_predicates":[]},"self_":{"variant":"SelfBorrowed","fields":[{"_field0":"'a"},"Immutable"]},"unsafety":"Normal","constness":"NotConst","decl":{"inputs":{"values":[]},"output":{"variant":"Return","fields":[{"variant":"BorrowedRef","fields":[{"_field0":"'a"},"Immutable",{"variant":"Vector","fields":[{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"Processor","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":0,"index":{"_field0":148}},false]}]}]}]},"variadic":false,"attrs":[]},"abi":"Rust"}]},"visibility":"Public","def_id":{"krate":0,"index":{"_field0":295}},"stability":null},{"source":{"filename":"src/system.rs","loline":169,"locol":4,"hiline":171,"hicol":5},"name":"get_total_memory","attrs":[],"inner":{"variant":"MethodItem","fields":[{"generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"self_":{"variant":"SelfBorrowed","fields":[null,"Immutable"]},"unsafety":"Normal","constness":"NotConst","decl":{"inputs":{"values":[]},"output":{"variant":"Return","fields":[{"variant":"Primitive","fields":["U64"]}]},"variadic":false,"attrs":[]},"abi":"Rust"}]},"visibility":"Public","def_id":{"krate":0,"index":{"_field0":298}},"stability":null},{"source":{"filename":"src/system.rs","loline":173,"locol":4,"hiline":175,"hicol":5},"name":"get_used_memory","attrs":[],"inner":{"variant":"MethodItem","fields":[{"generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"self_":{"variant":"SelfBorrowed","fields":[null,"Immutable"]},"unsafety":"Normal","constness":"NotConst","decl":{"inputs":{"values":[]},"output":{"variant":"Return","fields":[{"variant":"Primitive","fields":["U64"]}]},"variadic":false,"attrs":[]},"abi":"Rust"}]},"visibility":"Public","def_id":{"krate":0,"index":{"_field0":300}},"stability":null},{"source":{"filename":"src/system.rs","loline":177,"locol":4,"hiline":179,"hicol":5},"name":"get_total_swap","attrs":[],"inner":{"variant":"MethodItem","fields":[{"generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"self_":{"variant":"SelfBorrowed","fields":[null,"Immutable"]},"unsafety":"Normal","constness":"NotConst","decl":{"inputs":{"values":[]},"output":{"variant":"Return","fields":[{"variant":"Primitive","fields":["U64"]}]},"variadic":false,"attrs":[]},"abi":"Rust"}]},"visibility":"Public","def_id":{"krate":0,"index":{"_field0":302}},"stability":null},{"source":{"filename":"src/system.rs","loline":182,"locol":4,"hiline":184,"hicol":5},"name":"get_used_swap","attrs":[],"inner":{"variant":"MethodItem","fields":[{"generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"self_":{"variant":"SelfBorrowed","fields":[null,"Immutable"]},"unsafety":"Normal","constness":"NotConst","decl":{"inputs":{"values":[]},"output":{"variant":"Return","fields":[{"variant":"Primitive","fields":["U64"]}]},"variadic":false,"attrs":[]},"abi":"Rust"}]},"visibility":"Public","def_id":{"krate":0,"index":{"_field0":304}},"stability":null}],"derived":false,"polarity":"Positive"}]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":239}},"stability":null}],"is_crate":false}]},"visibility":"Public","def_id":{"krate":0,"index":{"_field0":219}},"stability":null},{"source":{"filename":"src/sysinfo.rs","loline":24,"locol":46,"hiline":24,"hicol":50},"name":null,"attrs":[{"variant":"Word","fields":["automatically_derived"]},{"variant":"List","fields":["allow",[{"variant":"Word","fields":["unused_qualifications"]}]]}],"inner":{"variant":"ImplItem","fields":[{"unsafety":"Normal","generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"trait_":{"variant":"ResolvedPath","fields":[{"global":true,"segments":[{"name":"std","params":{"variant":"AngleBracketed","fields":[[],[],[]]}},{"name":"marker","params":{"variant":"AngleBracketed","fields":[[],[],[]]}},{"name":"Copy","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":2,"index":{"_field0":12303}},false]},"for_":{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"Signal","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":0,"index":{"_field0":356}},false]},"items":[],"derived":true,"polarity":"Positive"}]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":388}},"stability":{"level":"Stable","feature":"rust1","since":"1.0.0","deprecated_since":"","reason":"","issue":null}},{"source":{"filename":"src/sysinfo.rs","loline":24,"locol":39,"hiline":24,"hicol":44},"name":null,"attrs":[{"variant":"Word","fields":["automatically_derived"]},{"variant":"List","fields":["allow",[{"variant":"Word","fields":["unused_qualifications"]}]]}],"inner":{"variant":"ImplItem","fields":[{"unsafety":"Normal","generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"trait_":{"variant":"ResolvedPath","fields":[{"global":true,"segments":[{"name":"std","params":{"variant":"AngleBracketed","fields":[[],[],[]]}},{"name":"fmt","params":{"variant":"AngleBracketed","fields":[[],[],[]]}},{"name":"Debug","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":2,"index":{"_field0":34846}},false]},"for_":{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"Signal","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":0,"index":{"_field0":356}},false]},"items":[{"source":{"filename":"src/sysinfo.rs","loline":24,"locol":39,"hiline":24,"hicol":44},"name":"fmt","attrs":[],"inner":{"variant":"MethodItem","fields":[{"generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"self_":{"variant":"SelfBorrowed","fields":[null,"Immutable"]},"unsafety":"Normal","constness":"NotConst","decl":{"inputs":{"values":[{"type_":{"variant":"BorrowedRef","fields":[null,"Mutable",{"variant":"ResolvedPath","fields":[{"global":true,"segments":[{"name":"std","params":{"variant":"AngleBracketed","fields":[[],[],[]]}},{"name":"fmt","params":{"variant":"AngleBracketed","fields":[[],[],[]]}},{"name":"Formatter","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":2,"index":{"_field0":34765}},false]}]},"name":"__arg_0","id":2743}]},"output":{"variant":"Return","fields":[{"variant":"ResolvedPath","fields":[{"global":true,"segments":[{"name":"std","params":{"variant":"AngleBracketed","fields":[[],[],[]]}},{"name":"fmt","params":{"variant":"AngleBracketed","fields":[[],[],[]]}},{"name":"Result","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":2,"index":{"_field0":34715}},false]}]},"variadic":false,"attrs":[]},"abi":"Rust"}]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":390}},"stability":{"level":"Stable","feature":"rust1","since":"1.0.0","deprecated_since":"","reason":"","issue":null}}],"derived":true,"polarity":"Positive"}]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":389}},"stability":{"level":"Stable","feature":"rust1","since":"1.0.0","deprecated_since":"","reason":"","issue":null}},{"source":{"filename":"src/sysinfo.rs","loline":24,"locol":27,"hiline":24,"hicol":37},"name":null,"attrs":[{"variant":"Word","fields":["automatically_derived"]},{"variant":"List","fields":["allow",[{"variant":"Word","fields":["unused_qualifications"]}]]}],"inner":{"variant":"ImplItem","fields":[{"unsafety":"Normal","generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"trait_":{"variant":"ResolvedPath","fields":[{"global":true,"segments":[{"name":"std","params":{"variant":"AngleBracketed","fields":[[],[],[]]}},{"name":"cmp","params":{"variant":"AngleBracketed","fields":[[],[],[]]}},{"name":"PartialOrd","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":2,"index":{"_field0":21188}},false]},"for_":{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"Signal","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":0,"index":{"_field0":356}},false]},"items":[{"source":{"filename":"src/sysinfo.rs","loline":24,"locol":27,"hiline":24,"hicol":37},"name":"partial_cmp","attrs":[{"variant":"Word","fields":["inline"]}],"inner":{"variant":"MethodItem","fields":[{"generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"self_":{"variant":"SelfBorrowed","fields":[null,"Immutable"]},"unsafety":"Normal","constness":"NotConst","decl":{"inputs":{"values":[{"type_":{"variant":"BorrowedRef","fields":[null,"Immutable",{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"Signal","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":0,"index":{"_field0":356}},false]}]},"name":"__arg_0","id":3166}]},"output":{"variant":"Return","fields":[{"variant":"ResolvedPath","fields":[{"global":true,"segments":[{"name":"std","params":{"variant":"AngleBracketed","fields":[[],[],[]]}},{"name":"option","params":{"variant":"AngleBracketed","fields":[[],[],[]]}},{"name":"Option","params":{"variant":"AngleBracketed","fields":[[],[{"variant":"ResolvedPath","fields":[{"global":true,"segments":[{"name":"std","params":{"variant":"AngleBracketed","fields":[[],[],[]]}},{"name":"cmp","params":{"variant":"AngleBracketed","fields":[[],[],[]]}},{"name":"Ordering","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":2,"index":{"_field0":21144}},false]}],[]]}}]},null,{"krate":2,"index":{"_field0":29010}},false]}]},"variadic":false,"attrs":[]},"abi":"Rust"}]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":425}},"stability":{"level":"Stable","feature":"rust1","since":"1.0.0","deprecated_since":"","reason":"","issue":null}},{"source":{"filename":"src/sysinfo.rs","loline":24,"locol":27,"hiline":24,"hicol":37},"name":"lt","attrs":[{"variant":"Word","fields":["inline"]}],"inner":{"variant":"MethodItem","fields":[{"generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"self_":{"variant":"SelfBorrowed","fields":[null,"Immutable"]},"unsafety":"Normal","constness":"NotConst","decl":{"inputs":{"values":[{"type_":{"variant":"BorrowedRef","fields":[null,"Immutable",{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"Signal","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":0,"index":{"_field0":356}},false]}]},"name":"__arg_0","id":3478}]},"output":{"variant":"Return","fields":[{"variant":"Primitive","fields":["Bool"]}]},"variadic":false,"attrs":[]},"abi":"Rust"}]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":430}},"stability":{"level":"Stable","feature":"rust1","since":"1.0.0","deprecated_since":"","reason":"","issue":null}},{"source":{"filename":"src/sysinfo.rs","loline":24,"locol":27,"hiline":24,"hicol":37},"name":"le","attrs":[{"variant":"Word","fields":["inline"]}],"inner":{"variant":"MethodItem","fields":[{"generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"self_":{"variant":"SelfBorrowed","fields":[null,"Immutable"]},"unsafety":"Normal","constness":"NotConst","decl":{"inputs":{"values":[{"type_":{"variant":"BorrowedRef","fields":[null,"Immutable",{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"Signal","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":0,"index":{"_field0":356}},false]}]},"name":"__arg_0","id":3727}]},"output":{"variant":"Return","fields":[{"variant":"Primitive","fields":["Bool"]}]},"variadic":false,"attrs":[]},"abi":"Rust"}]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":435}},"stability":{"level":"Stable","feature":"rust1","since":"1.0.0","deprecated_since":"","reason":"","issue":null}},{"source":{"filename":"src/sysinfo.rs","loline":24,"locol":27,"hiline":24,"hicol":37},"name":"gt","attrs":[{"variant":"Word","fields":["inline"]}],"inner":{"variant":"MethodItem","fields":[{"generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"self_":{"variant":"SelfBorrowed","fields":[null,"Immutable"]},"unsafety":"Normal","constness":"NotConst","decl":{"inputs":{"values":[{"type_":{"variant":"BorrowedRef","fields":[null,"Immutable",{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"Signal","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":0,"index":{"_field0":356}},false]}]},"name":"__arg_0","id":3976}]},"output":{"variant":"Return","fields":[{"variant":"Primitive","fields":["Bool"]}]},"variadic":false,"attrs":[]},"abi":"Rust"}]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":440}},"stability":{"level":"Stable","feature":"rust1","since":"1.0.0","deprecated_since":"","reason":"","issue":null}},{"source":{"filename":"src/sysinfo.rs","loline":24,"locol":27,"hiline":24,"hicol":37},"name":"ge","attrs":[{"variant":"Word","fields":["inline"]}],"inner":{"variant":"MethodItem","fields":[{"generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"self_":{"variant":"SelfBorrowed","fields":[null,"Immutable"]},"unsafety":"Normal","constness":"NotConst","decl":{"inputs":{"values":[{"type_":{"variant":"BorrowedRef","fields":[null,"Immutable",{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"Signal","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":0,"index":{"_field0":356}},false]}]},"name":"__arg_0","id":4225}]},"output":{"variant":"Return","fields":[{"variant":"Primitive","fields":["Bool"]}]},"variadic":false,"attrs":[]},"abi":"Rust"}]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":445}},"stability":{"level":"Stable","feature":"rust1","since":"1.0.0","deprecated_since":"","reason":"","issue":null}}],"derived":true,"polarity":"Positive"}]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":424}},"stability":{"level":"Stable","feature":"rust1","since":"1.0.0","deprecated_since":"","reason":"","issue":null}},{"source":{"filename":"src/sysinfo.rs","loline":24,"locol":16,"hiline":24,"hicol":25},"name":null,"attrs":[{"variant":"Word","fields":["automatically_derived"]},{"variant":"List","fields":["allow",[{"variant":"Word","fields":["unused_qualifications"]}]]}],"inner":{"variant":"ImplItem","fields":[{"unsafety":"Normal","generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"trait_":{"variant":"ResolvedPath","fields":[{"global":true,"segments":[{"name":"std","params":{"variant":"AngleBracketed","fields":[[],[],[]]}},{"name":"cmp","params":{"variant":"AngleBracketed","fields":[[],[],[]]}},{"name":"PartialEq","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":2,"index":{"_field0":21133}},false]},"for_":{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"Signal","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":0,"index":{"_field0":356}},false]},"items":[{"source":{"filename":"src/sysinfo.rs","loline":24,"locol":16,"hiline":24,"hicol":25},"name":"eq","attrs":[{"variant":"Word","fields":["inline"]}],"inner":{"variant":"MethodItem","fields":[{"generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"self_":{"variant":"SelfBorrowed","fields":[null,"Immutable"]},"unsafety":"Normal","constness":"NotConst","decl":{"inputs":{"values":[{"type_":{"variant":"BorrowedRef","fields":[null,"Immutable",{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"Signal","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":0,"index":{"_field0":356}},false]}]},"name":"__arg_0","id":4478}]},"output":{"variant":"Return","fields":[{"variant":"Primitive","fields":["Bool"]}]},"variadic":false,"attrs":[]},"abi":"Rust"}]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":451}},"stability":{"level":"Stable","feature":"rust1","since":"1.0.0","deprecated_since":"","reason":"","issue":null}},{"source":{"filename":"src/sysinfo.rs","loline":24,"locol":16,"hiline":24,"hicol":25},"name":"ne","attrs":[{"variant":"Word","fields":["inline"]}],"inner":{"variant":"MethodItem","fields":[{"generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"self_":{"variant":"SelfBorrowed","fields":[null,"Immutable"]},"unsafety":"Normal","constness":"NotConst","decl":{"inputs":{"values":[{"type_":{"variant":"BorrowedRef","fields":[null,"Immutable",{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"Signal","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":0,"index":{"_field0":356}},false]}]},"name":"__arg_0","id":4724}]},"output":{"variant":"Return","fields":[{"variant":"Primitive","fields":["Bool"]}]},"variadic":false,"attrs":[]},"abi":"Rust"}]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":456}},"stability":{"level":"Stable","feature":"rust1","since":"1.0.0","deprecated_since":"","reason":"","issue":null}}],"derived":true,"polarity":"Positive"}]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":450}},"stability":{"level":"Stable","feature":"rust1","since":"1.0.0","deprecated_since":"","reason":"","issue":null}},{"source":{"filename":"src/sysinfo.rs","loline":24,"locol":9,"hiline":24,"hicol":14},"name":null,"attrs":[{"variant":"Word","fields":["automatically_derived"]},{"variant":"List","fields":["allow",[{"variant":"Word","fields":["unused_qualifications"]}]]}],"inner":{"variant":"ImplItem","fields":[{"unsafety":"Normal","generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"trait_":{"variant":"ResolvedPath","fields":[{"global":true,"segments":[{"name":"std","params":{"variant":"AngleBracketed","fields":[[],[],[]]}},{"name":"clone","params":{"variant":"AngleBracketed","fields":[[],[],[]]}},{"name":"Clone","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":2,"index":{"_field0":21714}},false]},"for_":{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"Signal","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":0,"index":{"_field0":356}},false]},"items":[{"source":{"filename":"src/sysinfo.rs","loline":24,"locol":9,"hiline":24,"hicol":14},"name":"clone","attrs":[{"variant":"Word","fields":["inline"]}],"inner":{"variant":"MethodItem","fields":[{"generics":{"lifetimes":[],"type_params":[],"where_predicates":[]},"self_":{"variant":"SelfBorrowed","fields":[null,"Immutable"]},"unsafety":"Normal","constness":"NotConst","decl":{"inputs":{"values":[]},"output":{"variant":"Return","fields":[{"variant":"ResolvedPath","fields":[{"global":false,"segments":[{"name":"Signal","params":{"variant":"AngleBracketed","fields":[[],[],[]]}}]},null,{"krate":0,"index":{"_field0":356}},false]}]},"variadic":false,"attrs":[]},"abi":"Rust"}]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":462}},"stability":{"level":"Stable","feature":"rust1","since":"1.0.0","deprecated_since":"","reason":"","issue":null}}],"derived":true,"polarity":"Positive"}]},"visibility":"Inherited","def_id":{"krate":0,"index":{"_field0":461}},"stability":{"level":"Stable","feature":"rust1","since":"1.0.0","deprecated_since":"","reason":"","issue":null}}],"is_crate":true}]},"visibility":"Public","def_id":{"krate":0,"index":{"_field0":0}},"stability":null},"externs":[[1,{"name":"std","attrs":[{"variant":"NameValue","fields":["doc"," # The Rust Standard Library"]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," The Rust Standard Library is the foundation of portable Rust software, a"]},{"variant":"NameValue","fields":["doc"," set of minimal and battle-tested shared abstractions for the [broader Rust"]},{"variant":"NameValue","fields":["doc"," ecosystem][crates.io]. It offers core types, like [`Vec<T>`] and"]},{"variant":"NameValue","fields":["doc"," [`Option<T>`], library-defined [operations on language"]},{"variant":"NameValue","fields":["doc"," primitives](#primitives), [standard macros](#macros), [I/O] and"]},{"variant":"NameValue","fields":["doc"," [multithreading], among [many other things][other]."]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," `std` is available to all Rust crates by default, just as if each one"]},{"variant":"NameValue","fields":["doc"," contained an `extern crate std;` import at the [crate root]. Therefore the"]},{"variant":"NameValue","fields":["doc"," standard library can be accessed in [`use`] statements through the path"]},{"variant":"NameValue","fields":["doc"," `std`, as in [`use std::env`], or in expressions through the absolute path"]},{"variant":"NameValue","fields":["doc"," `::std`, as in [`::std::env::args()`]."]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," # How to read this documentation"]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," If you already know the name of what you are looking for the fastest way to"]},{"variant":"NameValue","fields":["doc"," find it is to use the <a href=\"#\" onclick=\"focusSearchBar();\">search"]},{"variant":"NameValue","fields":["doc"," bar</a> at the top of the page."]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," Otherwise, you may want to jump to one of these useful sections:"]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," * [`std::*` modules](#modules)"]},{"variant":"NameValue","fields":["doc"," * [Primitive types](#primitives)"]},{"variant":"NameValue","fields":["doc"," * [Standard macros](#macros)"]},{"variant":"NameValue","fields":["doc"," * [The Rust Prelude](prelude/index.html)"]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," If this is your first time, the documentation for the standard library is"]},{"variant":"NameValue","fields":["doc"," written to be casually perused. Clicking on interesting things should"]},{"variant":"NameValue","fields":["doc"," generally lead you to interesting places. Still, there are important bits"]},{"variant":"NameValue","fields":["doc"," you don't want to miss, so read on for a tour of the standard library and"]},{"variant":"NameValue","fields":["doc"," its documentation!"]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," Once you are familiar with the contents of the standard library you may"]},{"variant":"NameValue","fields":["doc"," begin to find the verbosity of the prose distracting. At this stage in your"]},{"variant":"NameValue","fields":["doc"," development you may want to press the **[-]** button near the top of the"]},{"variant":"NameValue","fields":["doc"," page to collapse it into a more skimmable view."]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," While you are looking at that **[-]** button also notice the **[src]**"]},{"variant":"NameValue","fields":["doc"," button. Rust's API documentation comes with the source code and you are"]},{"variant":"NameValue","fields":["doc"," encouraged to read it. The standard library source is generally high"]},{"variant":"NameValue","fields":["doc"," quality and a peek behind the curtains is often enlightening."]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," # What is in the standard library documentation?"]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," First of all, The Rust Standard Library is divided into a number of focused"]},{"variant":"NameValue","fields":["doc"," modules, [all listed further down this page](#modules). These modules are"]},{"variant":"NameValue","fields":["doc"," the bedrock upon which all of Rust is forged, and they have mighty names"]},{"variant":"NameValue","fields":["doc"," like [`std::slice`] and [`std::cmp`]. Modules' documentation typically"]},{"variant":"NameValue","fields":["doc"," includes an overview of the module along with examples, and are a smart"]},{"variant":"NameValue","fields":["doc"," place to start familiarizing yourself with the library."]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," Second, implicit methods on [primitive types] are documented here. This can"]},{"variant":"NameValue","fields":["doc"," be a source of confusion for two reasons:"]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," 1. While primitives are implemented by the compiler, the standard library"]},{"variant":"NameValue","fields":["doc","    implements methods directly on the primitive types (and it is the only"]},{"variant":"NameValue","fields":["doc","    library that does so), which are [documented in the section on"]},{"variant":"NameValue","fields":["doc","    primitives](#primitives)."]},{"variant":"NameValue","fields":["doc"," 2. The standard library exports many modules *with the same name as"]},{"variant":"NameValue","fields":["doc","    primitive types*. These define additional items related to the primitive"]},{"variant":"NameValue","fields":["doc","    type, but not the all-important methods."]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," So for example there is a [page for the primitive type"]},{"variant":"NameValue","fields":["doc"," `i32`](primitive.i32.html) that lists all the methods that can be called on"]},{"variant":"NameValue","fields":["doc"," 32-bit integers (very useful), and there is a [page for the module"]},{"variant":"NameValue","fields":["doc"," `std::i32`](i32/index.html) that documents the constant values [`MIN`] and"]},{"variant":"NameValue","fields":["doc"," [`MAX`](i32/constant.MAX.html) (rarely useful)."]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," Note the documentation for the primitives [`str`] and [`[T]`][slice] (also"]},{"variant":"NameValue","fields":["doc"," called 'slice'). Many method calls on [`String`] and [`Vec<T>`] are actually"]},{"variant":"NameValue","fields":["doc"," calls to methods on [`str`] and [`[T]`][slice] respectively, via [deref"]},{"variant":"NameValue","fields":["doc"," coercions]."]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," Third, the standard library defines [The Rust Prelude], a small collection"]},{"variant":"NameValue","fields":["doc"," of items - mostly traits - that are imported into every module of every"]},{"variant":"NameValue","fields":["doc"," crate. The traits in the prelude are pervasive, making the prelude"]},{"variant":"NameValue","fields":["doc"," documentation a good entry point to learning about the library."]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," And finally, the standard library exports a number of standard macros, and"]},{"variant":"NameValue","fields":["doc"," [lists them on this page](#macros) (technically, not all of the standard"]},{"variant":"NameValue","fields":["doc"," macros are defined by the standard library - some are defined by the"]},{"variant":"NameValue","fields":["doc"," compiler - but they are documented here the same). Like the prelude, the"]},{"variant":"NameValue","fields":["doc"," standard macros are imported by default into all crates."]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," # A Tour of The Rust Standard Library"]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," The rest of this crate documentation is dedicated to pointing out notable"]},{"variant":"NameValue","fields":["doc"," features of The Rust Standard Library."]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," ## Containers and collections"]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," The [`option`] and [`result`] modules define optional and error-handling"]},{"variant":"NameValue","fields":["doc"," types, [`Option<T>`] and [`Result<T, E>`]. The [`iter`] module defines"]},{"variant":"NameValue","fields":["doc"," Rust's iterator trait, [`Iterator`], which works with the [`for`] loop to"]},{"variant":"NameValue","fields":["doc"," access collections."]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," The standard library exposes three common ways to deal with contiguous"]},{"variant":"NameValue","fields":["doc"," regions of memory:"]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," * [`Vec<T>`] - A heap-allocated *vector* that is resizable at runtime."]},{"variant":"NameValue","fields":["doc"," * [`[T; n]`][array] - An inline *array* with a fixed size at compile time."]},{"variant":"NameValue","fields":["doc"," * [`[T]`][slice] - A dynamically sized *slice* into any other kind of contiguous"]},{"variant":"NameValue","fields":["doc","   storage, whether heap-allocated or not."]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," Slices can only be handled through some kind of *pointer*, and as such come"]},{"variant":"NameValue","fields":["doc"," in many flavors such as:"]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," * `&[T]` - *shared slice*"]},{"variant":"NameValue","fields":["doc"," * `&mut [T]` - *mutable slice*"]},{"variant":"NameValue","fields":["doc"," * [`Box<[T]>`][owned slice] - *owned slice*"]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," [`str`], a UTF-8 string slice, is a primitive type, and the standard library"]},{"variant":"NameValue","fields":["doc"," defines many methods for it. Rust [`str`]s are typically accessed as"]},{"variant":"NameValue","fields":["doc"," immutable references: `&str`. Use the owned [`String`] for building and"]},{"variant":"NameValue","fields":["doc"," mutating strings."]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," For converting to strings use the [`format!`] macro, and for converting from"]},{"variant":"NameValue","fields":["doc"," strings use the [`FromStr`] trait."]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," Data may be shared by placing it in a reference-counted box or the [`Rc`]"]},{"variant":"NameValue","fields":["doc"," type, and if further contained in a [`Cell`] or [`RefCell`], may be mutated"]},{"variant":"NameValue","fields":["doc"," as well as shared. Likewise, in a concurrent setting it is common to pair an"]},{"variant":"NameValue","fields":["doc"," atomically-reference-counted box, [`Arc`], with a [`Mutex`] to get the same"]},{"variant":"NameValue","fields":["doc"," effect."]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," The [`collections`] module defines maps, sets, linked lists and other"]},{"variant":"NameValue","fields":["doc"," typical collection types, including the common [`HashMap<K, V>`]."]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," ## Platform abstractions and I/O"]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," Besides basic data types, the standard library is largely concerned with"]},{"variant":"NameValue","fields":["doc"," abstracting over differences in common platforms, most notably Windows and"]},{"variant":"NameValue","fields":["doc"," Unix derivatives."]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," Common types of I/O, including [files], [TCP], [UDP], are defined in the"]},{"variant":"NameValue","fields":["doc"," [`io`], [`fs`], and [`net`] modules."]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," The [`thread`] module contains Rust's threading abstractions. [`sync`]"]},{"variant":"NameValue","fields":["doc"," contains further primitive shared memory types, including [`atomic`] and"]},{"variant":"NameValue","fields":["doc"," [`mpsc`], which contains the channel types for message passing."]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," [I/O]: io/index.html"]},{"variant":"NameValue","fields":["doc"," [MIN]: i32/constant.MIN.html"]},{"variant":"NameValue","fields":["doc"," [TCP]: net/struct.TcpStream.html"]},{"variant":"NameValue","fields":["doc"," [The Rust Prelude]: prelude/index.html"]},{"variant":"NameValue","fields":["doc"," [UDP]: net/struct.UdpSocket.html"]},{"variant":"NameValue","fields":["doc"," [`::std::env::args()`]: env/fn.args.html"]},{"variant":"NameValue","fields":["doc"," [`Arc`]: sync/struct.Arc.html"]},{"variant":"NameValue","fields":["doc"," [owned slice]: boxed/index.html"]},{"variant":"NameValue","fields":["doc"," [`Cell`]: cell/struct.Cell.html"]},{"variant":"NameValue","fields":["doc"," [`FromStr`]: str/trait.FromStr.html"]},{"variant":"NameValue","fields":["doc"," [`HashMap<K, V>`]: collections/struct.HashMap.html"]},{"variant":"NameValue","fields":["doc"," [`Iterator`]: iter/trait.Iterator.html"]},{"variant":"NameValue","fields":["doc"," [`Mutex`]: sync/struct.Mutex.html"]},{"variant":"NameValue","fields":["doc"," [`Option<T>`]: option/enum.Option.html"]},{"variant":"NameValue","fields":["doc"," [`Rc`]: rc/index.html"]},{"variant":"NameValue","fields":["doc"," [`RefCell`]: cell/struct.RefCell.html"]},{"variant":"NameValue","fields":["doc"," [`Result<T, E>`]: result/enum.Result.html"]},{"variant":"NameValue","fields":["doc"," [`String`]: string/struct.String.html"]},{"variant":"NameValue","fields":["doc"," [`Vec<T>`]: vec/index.html"]},{"variant":"NameValue","fields":["doc"," [array]: primitive.array.html"]},{"variant":"NameValue","fields":["doc"," [slice]: primitive.slice.html"]},{"variant":"NameValue","fields":["doc"," [`atomic`]: sync/atomic/index.html"]},{"variant":"NameValue","fields":["doc"," [`collections`]: collections/index.html"]},{"variant":"NameValue","fields":["doc"," [`for`]: ../book/loops.html#for"]},{"variant":"NameValue","fields":["doc"," [`format!`]: macro.format!.html"]},{"variant":"NameValue","fields":["doc"," [`fs`]: fs/index.html"]},{"variant":"NameValue","fields":["doc"," [`io`]: io/index.html"]},{"variant":"NameValue","fields":["doc"," [`iter`]: iter/index.html"]},{"variant":"NameValue","fields":["doc"," [`mpsc`]: sync/mpsc/index.html"]},{"variant":"NameValue","fields":["doc"," [`net`]: net/index.html"]},{"variant":"NameValue","fields":["doc"," [`option`]: option/index.html"]},{"variant":"NameValue","fields":["doc"," [`result`]: result/index.html"]},{"variant":"NameValue","fields":["doc"," [`std::cmp`]: cmp/index.html"]},{"variant":"NameValue","fields":["doc"," [`std::slice`]: slice/index.html"]},{"variant":"NameValue","fields":["doc"," [`str`]: primitive.str.html"]},{"variant":"NameValue","fields":["doc"," [`sync`]: sync/index.html"]},{"variant":"NameValue","fields":["doc"," [`thread`]: thread/index.html"]},{"variant":"NameValue","fields":["doc"," [`use std::env`]: env/index.html"]},{"variant":"NameValue","fields":["doc"," [`use`]: ../book/crates-and-modules.html#importing-modules-with-use"]},{"variant":"NameValue","fields":["doc"," [crate root]: ../book/crates-and-modules.html#basic-terminology:-crates-and-modules"]},{"variant":"NameValue","fields":["doc"," [crates.io]: https://crates.io"]},{"variant":"NameValue","fields":["doc"," [deref coercions]: ../book/deref-coercions.html"]},{"variant":"NameValue","fields":["doc"," [files]: fs/struct.File.html"]},{"variant":"NameValue","fields":["doc"," [multithreading]: thread/index.html"]},{"variant":"NameValue","fields":["doc"," [other]: #what-is-in-the-standard-library-documentation"]},{"variant":"NameValue","fields":["doc"," [primitive types]: ../book/primitive-types.html"]},{"variant":"NameValue","fields":["crate_name","std"]},{"variant":"List","fields":["stable",[{"variant":"NameValue","fields":["feature","rust1"]},{"variant":"NameValue","fields":["since","1.0.0"]}]]},{"variant":"Word","fields":["staged_api"]},{"variant":"NameValue","fields":["crate_type","rlib"]},{"variant":"NameValue","fields":["crate_type","dylib"]},{"variant":"List","fields":["doc",[{"variant":"NameValue","fields":["html_logo_url","https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png"]},{"variant":"NameValue","fields":["html_favicon_url","https://doc.rust-lang.org/favicon.ico"]},{"variant":"NameValue","fields":["html_root_url","https://doc.rust-lang.org/nightly/"]},{"variant":"NameValue","fields":["html_playground_url","https://play.rust-lang.org/"]},{"variant":"NameValue","fields":["issue_tracker_base_url","https://github.com/rust-lang/rust/issues/"]},{"variant":"List","fields":["test",[{"variant":"Word","fields":["no_crate_inject"]},{"variant":"List","fields":["attr",[{"variant":"List","fields":["deny",[{"variant":"Word","fields":["warnings"]}]]}]]}]]},{"variant":"List","fields":["test",[{"variant":"List","fields":["attr",[{"variant":"List","fields":["allow",[{"variant":"Word","fields":["dead_code"]},{"variant":"Word","fields":["deprecated"]},{"variant":"Word","fields":["unused_variables"]},{"variant":"Word","fields":["unused_mut"]}]]}]]}]]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["alloc"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["allow_internal_unstable"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["asm"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["associated_consts"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["borrow_state"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["box_syntax"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["cfg_target_vendor"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["char_internals"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["clone_from_slice"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["collections"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["collections_bound"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["const_fn"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["core"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["core_float"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["core_intrinsics"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["core_simd"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["decode_utf16"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["drain"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["drop_in_place"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["dropck_parametricity"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["float_extras"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["float_from_str_radix"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["fnbox"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["heap_api"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["int_error_internals"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["into_cow"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["lang_items"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["libc"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["link_args"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["linkage"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["macro_reexport"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["no_std"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["oom"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["optin_builtin_traits"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["placement_in_syntax"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["rand"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["range_inclusive"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["raw"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["reflect_marker"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["slice_bytes"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["slice_concat_ext"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["slice_patterns"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["staged_api"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["str_char"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["str_internals"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["str_utf16"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["test"]},{"variant":"Word","fields":["rustc_private"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["thread_local"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["unboxed_closures"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["unicode"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["unique"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["unsafe_no_drop_flag"]},{"variant":"Word","fields":["filling_drop"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["unwind_attributes"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["vec_push_all"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["wrapping"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["zero_one"]}]]},{"variant":"Word","fields":["no_std"]},{"variant":"List","fields":["deny",[{"variant":"Word","fields":["missing_docs"]}]]},{"variant":"List","fields":["allow",[{"variant":"Word","fields":["unused_features"]}]]}],"primitives":["Bool","Char","PrimitiveRawPointer","Array","Slice","Str","PrimitiveTuple","F32","F64","I8","I16","I32","I64","U8","U16","U32","U64","Isize","Usize"]}],[2,{"name":"core","attrs":[{"variant":"NameValue","fields":["doc"," # The Rust Core Library"]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," The Rust Core Library is the dependency-free[^free] foundation of [The"]},{"variant":"NameValue","fields":["doc"," Rust Standard Library](../std/index.html). It is the portable glue"]},{"variant":"NameValue","fields":["doc"," between the language and its libraries, defining the intrinsic and"]},{"variant":"NameValue","fields":["doc"," primitive building blocks of all Rust code. It links to no"]},{"variant":"NameValue","fields":["doc"," upstream libraries, no system libraries, and no libc."]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," [^free]: Strictly speaking, there are some symbols which are needed but"]},{"variant":"NameValue","fields":["doc","          they aren't always necessary."]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," The core library is *minimal*: it isn't even aware of heap allocation,"]},{"variant":"NameValue","fields":["doc"," nor does it provide concurrency or I/O. These things require"]},{"variant":"NameValue","fields":["doc"," platform integration, and this library is platform-agnostic."]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," *It is not recommended to use the core library*. The stable"]},{"variant":"NameValue","fields":["doc"," functionality of libcore is reexported from the"]},{"variant":"NameValue","fields":["doc"," [standard library](../std/index.html). The composition of this library is"]},{"variant":"NameValue","fields":["doc"," subject to change over time; only the interface exposed through libstd is"]},{"variant":"NameValue","fields":["doc"," intended to be stable."]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," # How to use the core library"]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," This library is built on the assumption of a few existing symbols:"]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," * `memcpy`, `memcmp`, `memset` - These are core memory routines which are"]},{"variant":"NameValue","fields":["doc","   often generated by LLVM. Additionally, this library can make explicit"]},{"variant":"NameValue","fields":["doc","   calls to these functions. Their signatures are the same as found in C."]},{"variant":"NameValue","fields":["doc","   These functions are often provided by the system libc, but can also be"]},{"variant":"NameValue","fields":["doc","   provided by the [rlibc crate](https://crates.io/crates/rlibc)."]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," * `rust_begin_unwind` - This function takes three arguments, a"]},{"variant":"NameValue","fields":["doc","   `fmt::Arguments`, a `&str`, and a `u32`. These three arguments dictate"]},{"variant":"NameValue","fields":["doc","   the panic message, the file at which panic was invoked, and the line."]},{"variant":"NameValue","fields":["doc","   It is up to consumers of this core library to define this panic"]},{"variant":"NameValue","fields":["doc","   function; it is only required to never return."]},{"variant":"NameValue","fields":["crate_name","core"]},{"variant":"List","fields":["unstable",[{"variant":"NameValue","fields":["feature","core"]},{"variant":"NameValue","fields":["reason","the libcore library has not yet been scrutinized for stabilization in terms of structure and naming"]},{"variant":"NameValue","fields":["issue","27701"]}]]},{"variant":"Word","fields":["staged_api"]},{"variant":"NameValue","fields":["crate_type","rlib"]},{"variant":"List","fields":["doc",[{"variant":"NameValue","fields":["html_logo_url","https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png"]},{"variant":"NameValue","fields":["html_favicon_url","https://doc.rust-lang.org/favicon.ico"]},{"variant":"NameValue","fields":["html_root_url","https://doc.rust-lang.org/nightly/"]},{"variant":"NameValue","fields":["html_playground_url","https://play.rust-lang.org/"]},{"variant":"NameValue","fields":["issue_tracker_base_url","https://github.com/rust-lang/rust/issues/"]}]]},{"variant":"List","fields":["doc",[{"variant":"List","fields":["test",[{"variant":"Word","fields":["no_crate_inject"]},{"variant":"List","fields":["attr",[{"variant":"List","fields":["allow",[{"variant":"Word","fields":["unused_variables"]}]]},{"variant":"List","fields":["deny",[{"variant":"Word","fields":["warnings"]}]]}]]}]]}]]},{"variant":"Word","fields":["no_core"]},{"variant":"List","fields":["deny",[{"variant":"Word","fields":["missing_docs"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["allow_internal_unstable"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["associated_type_defaults"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["concat_idents"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["const_fn"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["custom_attribute"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["fundamental"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["intrinsics"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["lang_items"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["no_core"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["on_unimplemented"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["optin_builtin_traits"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["reflect"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["rustc_attrs"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["unwind_attributes"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["repr_simd"]},{"variant":"Word","fields":["platform_intrinsics"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["staged_api"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["unboxed_closures"]}]]}],"primitives":[]}],[3,{"name":"collections","attrs":[{"variant":"NameValue","fields":["doc"," Collection types."]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," See [std::collections](../std/collections) for a detailed discussion of"]},{"variant":"NameValue","fields":["doc"," collections in Rust."]},{"variant":"NameValue","fields":["crate_name","collections"]},{"variant":"Word","fields":["staged_api"]},{"variant":"NameValue","fields":["crate_type","rlib"]},{"variant":"List","fields":["unstable",[{"variant":"NameValue","fields":["feature","collections"]},{"variant":"NameValue","fields":["reason","library is unlikely to be stabilized with the current layout and name, use std::collections instead"]},{"variant":"NameValue","fields":["issue","27783"]}]]},{"variant":"List","fields":["doc",[{"variant":"NameValue","fields":["html_logo_url","https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png"]},{"variant":"NameValue","fields":["html_favicon_url","https://doc.rust-lang.org/favicon.ico"]},{"variant":"NameValue","fields":["html_root_url","https://doc.rust-lang.org/nightly/"]},{"variant":"NameValue","fields":["html_playground_url","https://play.rust-lang.org/"]},{"variant":"NameValue","fields":["issue_tracker_base_url","https://github.com/rust-lang/rust/issues/"]},{"variant":"List","fields":["test",[{"variant":"Word","fields":["no_crate_inject"]},{"variant":"List","fields":["attr",[{"variant":"List","fields":["allow",[{"variant":"Word","fields":["unused_variables"]}]]},{"variant":"List","fields":["deny",[{"variant":"Word","fields":["warnings"]}]]}]]}]]}]]},{"variant":"List","fields":["allow",[{"variant":"Word","fields":["trivial_casts"]}]]},{"variant":"List","fields":["allow",[{"variant":"Word","fields":["unused_features"]}]]},{"variant":"List","fields":["allow",[{"variant":"Word","fields":["unused_attributes"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["alloc"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["box_patterns"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["box_syntax"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["core_intrinsics"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["core_slice_ext"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["core_str_ext"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["fmt_internals"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["fmt_radix"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["heap_api"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["iter_arith"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["iter_arith"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["lang_items"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["num_bits_bytes"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["oom"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["pattern"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["ptr_as_ref"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["ref_slice"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["slice_bytes"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["slice_patterns"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["staged_api"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["step_by"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["str_char"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["unboxed_closures"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["unicode"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["unique"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["dropck_parametricity"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["unsafe_no_drop_flag"]},{"variant":"Word","fields":["filling_drop"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["decode_utf16"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["drop_in_place"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["no_std"]}]]},{"variant":"Word","fields":["no_std"]}],"primitives":[]}],[4,{"name":"rustc_unicode","attrs":[{"variant":"NameValue","fields":["doc"," # The Unicode Library"]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," Unicode-intensive functions for `char` and `str` types."]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," This crate provides a collection of Unicode-related functionality,"]},{"variant":"NameValue","fields":["doc"," including decompositions, conversions, etc., and provides traits"]},{"variant":"NameValue","fields":["doc"," implementing these functions for the `char` and `str` types."]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," The functionality included here is only that which is necessary to"]},{"variant":"NameValue","fields":["doc"," provide for basic string-related manipulations. This crate does not"]},{"variant":"NameValue","fields":["doc"," (yet) aim to provide a full set of Unicode tables."]},{"variant":"NameValue","fields":["crate_name","rustc_unicode"]},{"variant":"List","fields":["unstable",[{"variant":"NameValue","fields":["feature","unicode"]},{"variant":"NameValue","fields":["issue","27783"]}]]},{"variant":"Word","fields":["staged_api"]},{"variant":"NameValue","fields":["crate_type","rlib"]},{"variant":"List","fields":["doc",[{"variant":"NameValue","fields":["html_logo_url","https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png"]},{"variant":"NameValue","fields":["html_favicon_url","https://doc.rust-lang.org/favicon.ico"]},{"variant":"NameValue","fields":["html_root_url","https://doc.rust-lang.org/nightly/"]},{"variant":"NameValue","fields":["html_playground_url","https://play.rust-lang.org/"]},{"variant":"NameValue","fields":["issue_tracker_base_url","https://github.com/rust-lang/rust/issues/"]},{"variant":"List","fields":["test",[{"variant":"Word","fields":["no_crate_inject"]},{"variant":"List","fields":["attr",[{"variant":"List","fields":["allow",[{"variant":"Word","fields":["unused_variables"]}]]},{"variant":"List","fields":["deny",[{"variant":"Word","fields":["warnings"]}]]}]]}]]}]]},{"variant":"Word","fields":["no_std"]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["core_char_ext"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["core_slice_ext"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["core_str_ext"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["lang_items"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["no_std"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["staged_api"]}]]}],"primitives":[]}],[5,{"name":"alloc","attrs":[{"variant":"NameValue","fields":["doc"," # The Rust core allocation library"]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," This is the lowest level library through which allocation in Rust can be"]},{"variant":"NameValue","fields":["doc"," performed."]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," This library, like libcore, is not intended for general usage, but rather as"]},{"variant":"NameValue","fields":["doc"," a building block of other libraries. The types and interfaces in this"]},{"variant":"NameValue","fields":["doc"," library are reexported through the [standard library](../std/index.html),"]},{"variant":"NameValue","fields":["doc"," and should not be used through this library."]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," Currently, there are four major definitions in this library."]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," ## Boxed values"]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," The [`Box`](boxed/index.html) type is a smart pointer type. There can"]},{"variant":"NameValue","fields":["doc"," only be one owner of a `Box`, and the owner can decide to mutate the"]},{"variant":"NameValue","fields":["doc"," contents, which live on the heap."]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," This type can be sent among threads efficiently as the size of a `Box` value"]},{"variant":"NameValue","fields":["doc"," is the same as that of a pointer. Tree-like data structures are often built"]},{"variant":"NameValue","fields":["doc"," with boxes because each node often has only one owner, the parent."]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," ## Reference counted pointers"]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," The [`Rc`](rc/index.html) type is a non-threadsafe reference-counted pointer"]},{"variant":"NameValue","fields":["doc"," type intended for sharing memory within a thread. An `Rc` pointer wraps a"]},{"variant":"NameValue","fields":["doc"," type, `T`, and only allows access to `&T`, a shared reference."]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," This type is useful when inherited mutability (such as using `Box`) is too"]},{"variant":"NameValue","fields":["doc"," constraining for an application, and is often paired with the `Cell` or"]},{"variant":"NameValue","fields":["doc"," `RefCell` types in order to allow mutation."]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," ## Atomically reference counted pointers"]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," The [`Arc`](arc/index.html) type is the threadsafe equivalent of the `Rc`"]},{"variant":"NameValue","fields":["doc"," type. It provides all the same functionality of `Rc`, except it requires"]},{"variant":"NameValue","fields":["doc"," that the contained type `T` is shareable. Additionally, `Arc<T>` is itself"]},{"variant":"NameValue","fields":["doc"," sendable while `Rc<T>` is not."]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," This types allows for shared access to the contained data, and is often"]},{"variant":"NameValue","fields":["doc"," paired with synchronization primitives such as mutexes to allow mutation of"]},{"variant":"NameValue","fields":["doc"," shared resources."]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," ## Heap interfaces"]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," The [`heap`](heap/index.html) module defines the low-level interface to the"]},{"variant":"NameValue","fields":["doc"," default global allocator. It is not compatible with the libc allocator API."]},{"variant":"NameValue","fields":["crate_name","alloc"]},{"variant":"NameValue","fields":["crate_type","rlib"]},{"variant":"Word","fields":["staged_api"]},{"variant":"List","fields":["allow",[{"variant":"Word","fields":["unused_attributes"]}]]},{"variant":"List","fields":["unstable",[{"variant":"NameValue","fields":["feature","alloc"]},{"variant":"NameValue","fields":["reason","this library is unlikely to be stabilized in its current form or name"]},{"variant":"NameValue","fields":["issue","27783"]}]]},{"variant":"List","fields":["doc",[{"variant":"NameValue","fields":["html_logo_url","https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png"]},{"variant":"NameValue","fields":["html_favicon_url","https://doc.rust-lang.org/favicon.ico"]},{"variant":"NameValue","fields":["html_root_url","https://doc.rust-lang.org/nightly/"]},{"variant":"NameValue","fields":["issue_tracker_base_url","https://github.com/rust-lang/rust/issues/"]},{"variant":"List","fields":["test",[{"variant":"Word","fields":["no_crate_inject"]},{"variant":"List","fields":["attr",[{"variant":"List","fields":["allow",[{"variant":"Word","fields":["unused_variables"]}]]},{"variant":"List","fields":["deny",[{"variant":"Word","fields":["warnings"]}]]}]]}]]}]]},{"variant":"Word","fields":["no_std"]},{"variant":"Word","fields":["needs_allocator"]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["allocator"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["box_syntax"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["coerce_unsized"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["core"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["core_intrinsics"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["core_slice_ext"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["custom_attribute"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["fundamental"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["lang_items"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["no_std"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["nonzero"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["num_bits_bytes"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["optin_builtin_traits"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["placement_in_syntax"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["placement_new_protocol"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["raw"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["shared"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["staged_api"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["unboxed_closures"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["unique"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["unsafe_no_drop_flag"]},{"variant":"Word","fields":["filling_drop"]}]]},{"variant":"List","fields":["allow",[{"variant":"Word","fields":["unused_features"]}]]},{"variant":"List","fields":["allow",[{"variant":"Word","fields":["unused_attributes"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["dropck_parametricity"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["unsize"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["core_slice_ext"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["core_str_ext"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["drop_in_place"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["needs_allocator"]}]]}],"primitives":[]}],[6,{"name":"rand","attrs":[{"variant":"NameValue","fields":["doc"," Interface to random number generators in Rust."]},{"variant":"NameValue","fields":["doc",""]},{"variant":"NameValue","fields":["doc"," This is an experimental library which lives underneath the standard library"]},{"variant":"NameValue","fields":["doc"," in its dependency chain. This library is intended to define the interface"]},{"variant":"NameValue","fields":["doc"," for random number generation and also provide utilities around doing so. It"]},{"variant":"NameValue","fields":["doc"," is not recommended to use this library directly, but rather the official"]},{"variant":"NameValue","fields":["doc"," interface through `std::rand`."]},{"variant":"NameValue","fields":["crate_name","rand"]},{"variant":"NameValue","fields":["crate_type","rlib"]},{"variant":"List","fields":["doc",[{"variant":"NameValue","fields":["html_logo_url","https://www.rust-lang.org/logos/rust-logo-128x128-blk.png"]},{"variant":"NameValue","fields":["html_favicon_url","https://doc.rust-lang.org/favicon.ico"]},{"variant":"NameValue","fields":["html_root_url","https://doc.rust-lang.org/nightly/"]},{"variant":"NameValue","fields":["html_playground_url","https://play.rust-lang.org/"]},{"variant":"List","fields":["test",[{"variant":"List","fields":["attr",[{"variant":"List","fields":["deny",[{"variant":"Word","fields":["warnings"]}]]}]]}]]}]]},{"variant":"Word","fields":["no_std"]},{"variant":"Word","fields":["staged_api"]},{"variant":"List","fields":["unstable",[{"variant":"NameValue","fields":["feature","rand"]},{"variant":"NameValue","fields":["reason","use `rand` from crates.io"]},{"variant":"NameValue","fields":["issue","27703"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["core_float"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["core_intrinsics"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["core_slice_ext"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["no_std"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["num_bits_bytes"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["staged_api"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["step_by"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["custom_attribute"]}]]},{"variant":"List","fields":["allow",[{"variant":"Word","fields":["unused_attributes"]}]]},{"variant":"List","fields":["allow",[{"variant":"Word","fields":["deprecated"]}]]}],"primitives":[]}],[7,{"name":"libc","attrs":[{"variant":"NameValue","fields":["doc"," Crate docs"]},{"variant":"List","fields":["allow",[{"variant":"Word","fields":["bad_style"]},{"variant":"Word","fields":["overflowing_literals"]},{"variant":"Word","fields":["improper_ctypes"]}]]},{"variant":"NameValue","fields":["crate_type","rlib"]},{"variant":"NameValue","fields":["crate_name","libc"]},{"variant":"List","fields":["doc",[{"variant":"NameValue","fields":["html_logo_url","https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png"]},{"variant":"NameValue","fields":["html_favicon_url","https://doc.rust-lang.org/favicon.ico"]}]]},{"variant":"List","fields":["doc",[{"variant":"NameValue","fields":["html_root_url","https://doc.rust-lang.org/libc/x86_64-apple-darwin"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["no_std"]},{"variant":"Word","fields":["core"]},{"variant":"Word","fields":["core_slice_ext"]},{"variant":"Word","fields":["staged_api"]}]]},{"variant":"Word","fields":["no_std"]},{"variant":"Word","fields":["staged_api"]},{"variant":"List","fields":["allow",[{"variant":"Word","fields":["warnings"]}]]},{"variant":"List","fields":["unstable",[{"variant":"NameValue","fields":["feature","libc"]},{"variant":"NameValue","fields":["reason","use `libc` from crates.io"]},{"variant":"NameValue","fields":["issue","27783"]}]]}],"primitives":[]}],[8,{"name":"alloc_jemalloc","attrs":[{"variant":"NameValue","fields":["crate_name","alloc_jemalloc"]},{"variant":"NameValue","fields":["crate_type","rlib"]},{"variant":"Word","fields":["staged_api"]},{"variant":"Word","fields":["no_std"]},{"variant":"Word","fields":["allocator"]},{"variant":"List","fields":["unstable",[{"variant":"NameValue","fields":["feature","alloc_jemalloc"]},{"variant":"NameValue","fields":["reason","this library is unlikely to be stabilized in its current form or name"]},{"variant":"NameValue","fields":["issue","27783"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["allocator"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["libc"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["no_std"]}]]},{"variant":"List","fields":["feature",[{"variant":"Word","fields":["staged_api"]}]]}],"primitives":[]}]],"primitives":[],"external_traits":{

When it tries to parse back, it fails as it is incomplete. I'm not sure if this is hitting a buffer limit for the json generation or there is an issue on implementing the Encodable trait.

@mitaa
Copy link
Contributor

mitaa commented Mar 31, 2016

Minimal testcase:

use std::collections::HashMap;

extern crate rustc_serialize;

#[derive(Hash, Eq, PartialEq, RustcEncodable, RustcDecodable)]
struct DefId(u32);

fn main() {
    let mut coll = HashMap::new();
    coll.insert(DefId(0), ());
    let json = rustc_serialize::json::as_json(&coll).to_string();
    println!("json = {}", json);
}

Outputs just json = {

@mitaa
Copy link
Contributor

mitaa commented Mar 31, 2016

Encoding coll yields a EncoderError::BadHashmapKey error, but the formatting machinery seems to discard it.

@mitaa
Copy link
Contributor

mitaa commented Mar 31, 2016

Oh, that makes sense, only strings are allowed as keys in json.

Manishearth added a commit to Manishearth/rust that referenced this issue Apr 8, 2016
bors added a commit that referenced this issue Apr 9, 2016
rustdoc: Remove the json-{input, output} format

(for reference #32698)

fixes #25108

r? @alexcrichton
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
5 participants