Skip to main content

RewriteRule

Trait RewriteRule 

Source
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§

Source

fn name(&self) -> &'static str

Source

fn matches(&self, command: &str) -> bool

Source

fn rewrite( &self, command: &str, session_id: Option<&str>, ctx: &AppContext, ) -> Result<Response, String>

Implementors§