os_bridge/linux/bridge.rs
1use crate::{common::{core::OsBridge, utils}, BridgeResult};
2
3pub struct Bridge {}
4
5impl Bridge {
6
7 // Correlation Function
8 #[allow(unused)]
9 pub fn new() -> Self {
10 Self {}
11 }
12
13}
14
15// achieve OsBridge trait
16impl OsBridge for Bridge {
17 fn get_pid(&self) -> BridgeResult<u32> {
18 Ok(utils::get_pid()?)
19 }
20}
21
22
23#[cfg(test)]
24mod tests {
25 use super::*;
26
27 #[test]
28 fn test_get_pid() {
29 let bd = Bridge::new();
30 println!("{:?}", bd.get_pid());
31 }
32}