Skip to main content

NetworkPolicyDecider

Trait NetworkPolicyDecider 

Source
pub trait NetworkPolicyDecider:
    Send
    + Sync
    + 'static {
    // Required method
    fn decide<'life0, 'async_trait>(
        &'life0 self,
        req: NetworkPolicyRequest,
    ) -> Pin<Box<dyn Future<Output = NetworkDecision> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Decide whether a network request should be allowed.

If command or exec_policy_hint is provided, callers can map exec-policy approvals to network access (e.g., allow all requests for commands matching approved prefixes like curl *).

Required Methods§

Source

fn decide<'life0, 'async_trait>( &'life0 self, req: NetworkPolicyRequest, ) -> Pin<Box<dyn Future<Output = NetworkDecision> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementations on Foreign Types§

Source§

impl<D: NetworkPolicyDecider + ?Sized> NetworkPolicyDecider for Arc<D>

Source§

fn decide<'life0, 'async_trait>( &'life0 self, req: NetworkPolicyRequest, ) -> Pin<Box<dyn Future<Output = NetworkDecision> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§

Source§

impl<F, Fut> NetworkPolicyDecider for F
where F: Fn(NetworkPolicyRequest) -> Fut + Send + Sync + 'static, Fut: Future<Output = NetworkDecision> + Send,