MCPcopy Create free account
hub / github.com/bytecodealliance/rustix / as_raw

Method as_raw

src/pid.rs:91–96  ·  view source on GitHub ↗
(pid: Option<Self>)

Source from the content-addressed store, hash-verified

89 /// Converts an `Option<Pid>` into a `RawPid`.
90 #[inline]
91 pub const fn as_raw(pid: Option<Self>) -> RawPid {
92 match pid {
93 Some(pid) => pid.0.get(),
94 None => 0,
95 }
96 }
97
98 /// Test whether this pid represents the init process ([`Pid::INIT`]).
99 #[inline]

Callers 4

insertMethod · 0.45
removeMethod · 0.45
containsMethod · 0.45

Calls 1

getMethod · 0.45

Tested by 1