pub trait RewriteRule: Send + Sync {
// Required methods
fn name(&self) -> &'static str;
fn matches(&self, command: &str) -> bool;
fn rewrite(
&self,
command: &str,
session_id: Option<&str>,
ctx: &AppContext,
) -> Result<Response, String>;
}Expand description
A RewriteRule matches a specific bash invocation pattern and dispatches
internally to an AFT tool.
Required Methods§
fn name(&self) -> &'static str
fn matches(&self, command: &str) -> bool
fn rewrite( &self, command: &str, session_id: Option<&str>, ctx: &AppContext, ) -> Result<Response, String>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".