feat(ipc): Error (ru.shturman.Error.*) + well-known имена

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Alexander <akotenev2003@gmail.com>
This commit is contained in:
2026-06-24 12:07:29 +03:00
parent df553790ae
commit d91d218ade
5 changed files with 64 additions and 1 deletions
+27
View File
@@ -0,0 +1,27 @@
//! Well-known имена / пути объектов / имена интерфейсов (ipc §2).
//! `ru.shturman.<Service>` · `/ru/shturman/<Service>` · `ru.shturman.<Service>N` (N = мажор).
pub mod power {
pub const NAME: &str = "ru.shturman.Power";
pub const PATH: &str = "/ru/shturman/Power";
pub const IFACE: &str = "ru.shturman.Power1";
}
pub mod settings {
pub const NAME: &str = "ru.shturman.Settings";
pub const PATH: &str = "/ru/shturman/Settings";
pub const IFACE: &str = "ru.shturman.Settings1";
}
#[cfg(test)]
mod tests {
#[test]
fn names_follow_convention() {
assert_eq!(super::power::NAME, "ru.shturman.Power");
assert_eq!(super::power::PATH, "/ru/shturman/Power");
assert_eq!(super::power::IFACE, "ru.shturman.Power1");
assert_eq!(super::settings::NAME, "ru.shturman.Settings");
assert_eq!(super::settings::PATH, "/ru/shturman/Settings");
assert_eq!(super::settings::IFACE, "ru.shturman.Settings1");
}
}