File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
postgresql_embedded/src/command Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -73,12 +73,15 @@ impl CommandToString for tokio::process::Command {
7373 }
7474}
7575
76+ /// Interface for executing a command
7677pub trait CommandExecutor {
78+ /// Execute the command and return the stdout and stderr
7779 async fn execute ( & mut self , timeout : Option < Duration > ) -> Result < ( String , String ) > ;
7880}
7981
8082/// Implement the [`CommandExecutor`] trait for [`Command`](std::process::Command)
8183impl CommandExecutor for std:: process:: Command {
84+ /// Execute the command and return the stdout and stderr
8285 async fn execute ( & mut self , _timeout : Option < Duration > ) -> Result < ( String , String ) > {
8386 debug ! ( "Executing command: {}" , self . to_command_string( ) ) ;
8487 self . stdout ( Stdio :: piped ( ) ) ;
@@ -108,6 +111,7 @@ impl CommandExecutor for std::process::Command {
108111#[ cfg( feature = "tokio" ) ]
109112/// Implement the [`CommandExecutor`] trait for [`Command`](tokio::process::Command)
110113impl CommandExecutor for tokio:: process:: Command {
114+ /// Execute the command and return the stdout and stderr
111115 async fn execute ( & mut self , timeout : Option < Duration > ) -> Result < ( String , String ) > {
112116 debug ! ( "Executing command: {}" , self . to_command_string( ) ) ;
113117 self . stdout ( Stdio :: piped ( ) ) ;
You can’t perform that action at this time.
0 commit comments