File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -184,6 +184,8 @@ impl<'a> From<ServiceRunnable<'a>> for ServiceRunnableOwned {
184
184
/// You can also use action maps to assist with cross-platform compatibility:
185
185
///
186
186
/// ```no_run
187
+ /// # #[macro_use] extern crate inapi;
188
+ /// # fn main() {
187
189
/// # use inapi::{Host, Service, ServiceRunnable};
188
190
/// # use std::collections::HashMap;
189
191
#[ cfg_attr( feature = "local-run" , doc = "# let path: Option<String> = None;" ) ]
@@ -195,6 +197,7 @@ impl<'a> From<ServiceRunnable<'a>> for ServiceRunnableOwned {
195
197
///}
196
198
///let service = Service::new_service(ServiceRunnable::Command("/usr/bin/my_svc"), Some(map));
197
199
///service.action(&mut host, "reload").unwrap(); // <-- Calls "/usr/bin/my_svc restart" on CentOS
200
+ /// # }
198
201
/// ```
199
202
pub struct Service {
200
203
/// Actions map for Runnables
You can’t perform that action at this time.
0 commit comments