diff --git a/src/lib.rs b/src/lib.rs index 03a3739..1d00503 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -169,6 +169,9 @@ pub trait Controller { #[doc(hidden)] fn control_type(&self) -> Controllers; + /// The file system path to the controller. + fn path(&self) -> &Path; + /// Apply a set of resources to the Controller, invoking its internal functions to pass the /// kernel the information. fn apply(&self, res: &Resources) -> Result<()>; @@ -194,6 +197,10 @@ impl Controller for T where T: ControllerInternal { ControllerInternal::control_type(self) } + fn path(&self) -> &Path { + self.get_path() + } + /// Apply a set of resources to the Controller, invoking its internal functions to pass the /// kernel the information. fn apply(&self, res: &Resources) -> Result<()> {