Skip to content

Commit 1809f56

Browse files
committed
Add Pid::as_raw_pid
1 parent cb01fbe commit 1809f56

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/pid.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@ impl Pid {
7171
self.0
7272
}
7373

74+
/// Converts a `Pid` into a `RawPid`.
75+
#[inline]
76+
pub const fn as_raw_pid(self) -> RawPid {
77+
self.0.get()
78+
}
79+
7480
/// Converts an `Option<Pid>` into a `RawPid`.
7581
#[inline]
7682
pub const fn as_raw(pid: Option<Self>) -> RawPid {

0 commit comments

Comments
 (0)