pub struct TRon { /* private fields */ }Expand description
Top-level MCP security monitor.
Implementations§
Source§impl TRon
impl TRon
Sourcepub fn new(config: TRonConfig) -> Self
pub fn new(config: TRonConfig) -> Self
Create a new t-ron security monitor.
Sourcepub fn load_policy(&self, toml_str: &str) -> Result<(), TRonError>
pub fn load_policy(&self, toml_str: &str) -> Result<(), TRonError>
Load policy from TOML string and apply rate limits.
Sourcepub fn load_policy_file(
&self,
path: impl Into<PathBuf>,
) -> Result<(), TRonError>
pub fn load_policy_file( &self, path: impl Into<PathBuf>, ) -> Result<(), TRonError>
Load policy from a file and store the path for hot-reload.
Sourcepub fn reload_policy(&self) -> Result<(), TRonError>
pub fn reload_policy(&self) -> Result<(), TRonError>
Reload policy from the previously loaded file path.
Designed for SIGHUP handlers — call this when the process receives a reload signal. Returns an error if no file was previously loaded.
Sourcepub fn policy_arc(&self) -> Arc<PolicyEngine>
pub fn policy_arc(&self) -> Arc<PolicyEngine>
Get a shared reference to the policy engine (for tool handlers).
Auto Trait Implementations§
impl !Freeze for TRon
impl !RefUnwindSafe for TRon
impl Send for TRon
impl Sync for TRon
impl Unpin for TRon
impl UnsafeUnpin for TRon
impl !UnwindSafe for TRon
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