From f30a4690df88b65c6f20e75d76f5f4d3eadddd57 Mon Sep 17 00:00:00 2001 From: futile Date: Thu, 4 Dec 2025 08:05:03 +0000 Subject: [PATCH] process: better doc on `Process::find` --- src/process.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/process.rs b/src/process.rs index ec22dcf..8ee7a5f 100644 --- a/src/process.rs +++ b/src/process.rs @@ -41,6 +41,16 @@ pub struct Process { impl Process { /// initialize a `Process` from a pid or a process name + /// + /// ### examples + /// + /// ```rust + /// let proc = Process::find(1337)?; + /// ``` + /// + /// ```rust + /// let proc = Process::find("notepad.exe")?; + /// ``` pub fn find>(identifier: T) -> Result { let identifier = identifier.into(); let snapshot = snapshot::ProcessSnapshot::get_processes()?