Skip to main content

SchemaDriver

Trait SchemaDriver 

Source
pub trait SchemaDriver: Send + Sync {
    // Required method
    fn current_schema<'life0, 'life1, 'async_trait>(
        &'life0 self,
        calls: &'life1 CallSlot,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Value>, FaucetError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;

    // Provided methods
    fn evolvable(&self) -> bool { ... }
    fn evolve<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        calls: &'life1 CallSlot,
        evolution: &'life2 SchemaEvolution,
    ) -> Pin<Box<dyn Future<Output = Result<(), FaucetError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait { ... }
}
Expand description

The schema primitives of a destination (#194).

Required Methods§

Source

fn current_schema<'life0, 'life1, 'async_trait>( &'life0 self, calls: &'life1 CallSlot, ) -> Pin<Box<dyn Future<Output = Result<Option<Value>, FaucetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

The live destination schema, infer_schema-shaped, or None when there is none yet.

Provided Methods§

Source

fn evolvable(&self) -> bool

Whether evolve is implemented.

Source

fn evolve<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, calls: &'life1 CallSlot, evolution: &'life2 SchemaEvolution, ) -> Pin<Box<dyn Future<Output = Result<(), FaucetError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Apply an additive evolution, idempotently.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§