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()?