diff --git a/noxis-rs/src/utils/files.rs b/noxis-rs/src/utils/files.rs index 2cfa44f..4d022b6 100644 --- a/noxis-rs/src/utils/files.rs +++ b/noxis-rs/src/utils/files.rs @@ -42,6 +42,7 @@ } impl FilesController { + #[inline(always)] pub fn new(name: &str, triggers: EventHandlers) -> FilesController { let name: Arc = Arc::from(name); Self { @@ -53,6 +54,7 @@ code_name : name.clone(), } } + #[inline(always)] pub fn with_path(mut self, path: impl AsRef) -> anyhow::Result { self.path = path.as_ref().to_string_lossy().into_owned(); self.watcher = { diff --git a/noxis-rs/src/utils/prcs.rs b/noxis-rs/src/utils/prcs.rs index 6c7c173..7999930 100644 --- a/noxis-rs/src/utils/prcs.rs +++ b/noxis-rs/src/utils/prcs.rs @@ -61,6 +61,7 @@ pub mod v2 { } impl ProcessesController { + #[inline(always)] pub fn new(name: &str, event_reader: MpscReciever) -> ProcessesController { ProcessesController { name : Arc::from(name), @@ -71,11 +72,11 @@ pub mod v2 { negative_events : HashSet::new(), } } + #[inline(always)] pub fn with_exe(mut self, bin: impl AsRef) -> ProcessesController { self.bin = bin.as_ref().to_string_lossy().into_owned(); self } - pub fn get_pid(&self) -> Pid { self.pid } diff --git a/noxis-rs/src/utils/services.rs b/noxis-rs/src/utils/services.rs index 33737a3..7885eb4 100644 --- a/noxis-rs/src/utils/services.rs +++ b/noxis-rs/src/utils/services.rs @@ -42,6 +42,7 @@ pub mod v2 { } impl ServicesController { + #[inline(always)] pub fn new() -> ServicesController { ServicesController { name : String::new(), @@ -51,6 +52,7 @@ pub mod v2 { event_registrator : EventHandlers::new(), } } + #[inline(always)] pub fn with_access_name( mut self, hostname: &str, @@ -60,7 +62,7 @@ pub mod v2 { self.access_url = Arc::from(access_url); self } - + #[inline(always)] pub fn with_params( mut self, conn_queue: ConnectionQueue, @@ -70,7 +72,6 @@ pub mod v2 { self.event_registrator = event_reg; self } - pub fn get_access_url(hostname: &str, port: Option<&u32>) -> String { format!("{}{}", hostname, port.map_or_else(|| "".to_string(), |p| format!(":{}", p))) }