pub struct Config {
pub host_routes: Vec<RouteRule>,
pub hostpass: Vec<HostPass>,
}Expand description
Router configuration loaded from TOML file.
Fields§
§host_routes: Vec<RouteRule>Routes that should go to the host bus instead of sandbox.
hostpass: Vec<HostPass>Processes allowed to register services on the host bus.
Implementations§
Source§impl Config
impl Config
Sourcepub fn should_route_to_host(&self, destination: &str) -> bool
pub fn should_route_to_host(&self, destination: &str) -> bool
Check if a destination should be routed to the host bus.
Sourcepub fn has_hostpass(&self, exe_path: &Path) -> bool
pub fn has_hostpass(&self, exe_path: &Path) -> bool
Check if a process is allowed to register services on the host bus.
Supports glob pattern matching (e.g., “/python3”, “/usr/bin/python*”).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more