Skip to main content

StandingRulePins

Trait StandingRulePins 

Source
pub trait StandingRulePins:
    Debug
    + Send
    + Sync {
    // Required method
    fn repin<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
        &'life0 self,
        subject: &'life1 str,
        source: &'life2 str,
        tool: &'life3 str,
        from: &'life4 str,
        to: &'life5 str,
    ) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait,
             'life4: 'async_trait,
             'life5: 'async_trait;
}
Expand description

Carries a person’s standing rules forward when a driver’s changed declarations are re-approved (spec 3.2 §7.7, K-I14).

The kernel depends on no harness type, so the harness implements this over its standing-rule store (adk-harness’s kernel feature).

§Example

use adk_kernel::drivers::StandingRulePins;

#[derive(Debug)]
struct NoRules;

#[async_trait::async_trait]
impl StandingRulePins for NoRules {
    async fn repin(&self, _: &str, _: &str, _: &str, _: &str, _: &str) -> adk_core::Result<usize> {
        Ok(0)
    }
}

Required Methods§

Source

fn repin<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>( &'life0 self, subject: &'life1 str, source: &'life2 str, tool: &'life3 str, from: &'life4 str, to: &'life5 str, ) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, 'life5: 'async_trait,

Moves subject’s standing rules for tool from source pinned to the declaration digest from onto to, and returns how many moved.

§Errors

Returns the rule store’s error.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§