@@ -467,6 +467,31 @@ mod unix {
467467 self . group = Some ( group)
468468 }
469469 }
470+
471+ pub fn with_pid_file ( mut self , v : ConfigPath ) -> Self {
472+ self . pid_file = Some ( v) ;
473+ self
474+ }
475+
476+ pub fn with_working_dir ( mut self , v : ConfigPath ) -> Self {
477+ self . working_dir = Some ( v) ;
478+ self
479+ }
480+
481+ pub fn with_chroot ( mut self , v : ConfigPath ) -> Self {
482+ self . chroot = Some ( v) ;
483+ self
484+ }
485+
486+ pub fn with_user ( mut self , v : & str ) -> Result < Self , String > {
487+ self . user = Some ( UserId :: from_str ( v) ?) ;
488+ Ok ( self )
489+ }
490+
491+ pub fn with_group ( mut self , v : & str ) -> Result < Self , String > {
492+ self . group = Some ( GroupId :: from_str ( v) ?) ;
493+ Ok ( self )
494+ }
470495 }
471496
472497
@@ -623,7 +648,7 @@ mod unix {
623648mod noop {
624649 use std:: path:: { PathBuf , StripPrefixError } ;
625650 use serde:: { Deserialize , Serialize } ;
626- use crate :: config:: ConfigFile ;
651+ use crate :: config:: { ConfigFile , ConfigPath } ;
627652 use crate :: error:: Failed ;
628653
629654
@@ -706,6 +731,26 @@ mod noop {
706731 pub fn apply_args ( & mut self , args : Args ) {
707732 let _ = args;
708733 }
734+
735+ pub fn with_pid_file ( self , _: ConfigPath ) -> Self {
736+ self
737+ }
738+
739+ pub fn with_working_dir ( self , _: ConfigPath ) -> Self {
740+ self
741+ }
742+
743+ pub fn with_chroot ( self , _: ConfigPath ) -> Self {
744+ self
745+ }
746+
747+ pub fn with_user ( self , _: & str ) -> Result < Self , String > {
748+ Ok ( self )
749+ }
750+
751+ pub fn with_group ( self , _: & str ) -> Result < Self , String > {
752+ Ok ( self )
753+ }
709754 }
710755
711756 //-------- Args ----------------------------------------------------------
0 commit comments