Skip to main content

Approval

Trait Approval 

Source
pub trait Approval: Send + Sync {
    // Required method
    fn approve<'life0, 'async_trait>(
        &'life0 self,
        summary: String,
    ) -> Pin<Box<dyn Future<Output = Result<bool, String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided method
    fn approve_in_app<'life0, 'async_trait>(
        &'life0 self,
        _summary: String,
    ) -> Pin<Box<dyn Future<Output = Result<bool, String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
}
Expand description

Asks for one decision about one write batch. Chat shows an approval card; the MCP server leaves the decision to its client.

Required Methods§

Source

fn approve<'life0, 'async_trait>( &'life0 self, summary: String, ) -> Pin<Box<dyn Future<Output = Result<bool, String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Provided Methods§

Source

fn approve_in_app<'life0, 'async_trait>( &'life0 self, _summary: String, ) -> Pin<Box<dyn Future<Output = Result<bool, String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Requires a fresh decision in the app. External/unattended consumers cannot grant it by inheriting their normal approval behavior.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§