Debian Codegraph @

src/pid.rs

raw symbols SCIP
1 use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/;
2 use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::numrust-analyzer cargo std https://github.com/rust-lang/rust/library/std num/::TryFromIntErrorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/error/TryFromIntError#;
3
4 /// Used as a wrapper for the process ID
5 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq:)]
6 pub struct Pidrust-analyzer cargo process_alive 0.2.0 pid/Pid#(pub(craterust-analyzer cargo process_alive 0.2.0 crate/) u32);
7
8 impl Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<u32> for Pidrust-analyzer cargo process_alive 0.2.0 pid/Pid# {
9 fn fromrust-analyzer cargo process_alive 0.2.0 pid/impl#[Pid][`From<u32>`]from().(value: u32) -> Selfrust-analyzer cargo process_alive 0.2.0 pid/impl#[Pid][`From<u32>`] {
10 Selfrust-analyzer cargo process_alive 0.2.0 pid/impl#[Pid][`From<u32>`](value)
11 }
12 }
13
14 impl TryFromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryFrom#<i32> for Pidrust-analyzer cargo process_alive 0.2.0 pid/Pid# {
15 type Errorrust-analyzer cargo process_alive 0.2.0 pid/impl#[Pid][`TryFrom<i32>`]Error# = TryFromIntErrorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/error/TryFromIntError#;
16
17 fn try_fromrust-analyzer cargo process_alive 0.2.0 pid/impl#[Pid][`TryFrom<i32>`]try_from().(value: i32) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Selfrust-analyzer cargo process_alive 0.2.0 pid/impl#[Pid][`TryFrom<i32>`], Selfrust-analyzer cargo process_alive 0.2.0 pid/impl#[Pid][`TryFrom<i32>`]::Errorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryFrom#Error#> {
18 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Selfrust-analyzer cargo process_alive 0.2.0 pid/impl#[Pid][`TryFrom<i32>`](value.try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`TryInto<U>`]try_into().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().))
19 }
20 }
21
22 impl fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/::Displayrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Display# for Pidrust-analyzer cargo process_alive 0.2.0 pid/Pid# {
23 fn fmtrust-analyzer cargo process_alive 0.2.0 pid/impl#[Pid][Display]fmt().(&self, f: &mut fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/::Formatterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Formatter#) -> fmtrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc fmt/::Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Result# {
24 writerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/write!!(f, "{}", self.0rust-analyzer cargo process_alive 0.2.0 pid/Pid#0.)
25 }
26 }