diff options
Diffstat (limited to 'crates/core/tedge/src/system_services/managers/null.rs')
-rw-r--r-- | crates/core/tedge/src/system_services/managers/null.rs | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/crates/core/tedge/src/system_services/managers/null.rs b/crates/core/tedge/src/system_services/managers/null.rs deleted file mode 100644 index c3416d8b..00000000 --- a/crates/core/tedge/src/system_services/managers/null.rs +++ /dev/null @@ -1,35 +0,0 @@ -use crate::system_services::{SystemService, SystemServiceError, SystemServiceManager}; - -/// A system service manager that always fails. -#[derive(Debug)] -pub struct NullSystemServiceManager; - -impl SystemServiceManager for NullSystemServiceManager { - fn name(&self) -> &str { - "null (no service manager)" - } - - fn check_operational(&self) -> Result<(), SystemServiceError> { - Err(SystemServiceError::UnsupportedOperation) - } - - fn stop_service(&self, _service: SystemService) -> Result<(), SystemServiceError> { - Err(SystemServiceError::UnsupportedOperation) - } - - fn restart_service(&self, _service: SystemService) -> Result<(), SystemServiceError> { - Err(SystemServiceError::UnsupportedOperation) - } - - fn enable_service(&self, _service: SystemService) -> Result<(), SystemServiceError> { - Err(SystemServiceError::UnsupportedOperation) - } - - fn disable_service(&self, _service: SystemService) -> Result<(), SystemServiceError> { - Err(SystemServiceError::UnsupportedOperation) - } - - fn is_service_running(&self, _service: SystemService) -> Result<bool, SystemServiceError> { - Err(SystemServiceError::UnsupportedOperation) - } -} |