pub struct ServiceConfig {
pub name: String,
pub display_name: String,
pub description: String,
pub executable_path: PathBuf,
pub args: Vec<String>,
pub config_path: PathBuf,
}Fields§
§name: String§display_name: String§description: String§executable_path: PathBuf§args: Vec<String>§config_path: PathBufImplementations§
Source§impl ServiceConfig
impl ServiceConfig
Sourcepub fn get_system_config_path() -> PathBuf
pub fn get_system_config_path() -> PathBuf
Get the system config path for the service based on the OS
Sourcepub fn get_sudo_user_config_path() -> Option<PathBuf>
pub fn get_sudo_user_config_path() -> Option<PathBuf>
Get the original user’s config path when running under sudo
Sourcepub fn copy_config_to_system(&self) -> Result<()>
pub fn copy_config_to_system(&self) -> Result<()>
Copy the provided config to the system location
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ServiceConfig
impl RefUnwindSafe for ServiceConfig
impl Send for ServiceConfig
impl Sync for ServiceConfig
impl Unpin for ServiceConfig
impl UnwindSafe for ServiceConfig
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more