Trait Persist

Source
pub trait Persist:
    Debug
    + Send
    + Sync
    + DynClone {
    // Required methods
    fn setup<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn store<'life0, 'async_trait>(
        &'life0 self,
        node: Node,
    ) -> Pin<Box<dyn Future<Output = Result<Node>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn batch_store<'life0, 'async_trait>(
        &'life0 self,
        nodes: Vec<Node>,
    ) -> Pin<Box<dyn Future<Output = IndexingStream> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided methods
    fn batch_size(&self) -> Option<usize> { ... }
    fn name(&self) -> &'static str { ... }
}
Expand description

Persists nodes

Required Methods§

Source

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

Source

fn store<'life0, 'async_trait>( &'life0 self, node: Node, ) -> Pin<Box<dyn Future<Output = Result<Node>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn batch_store<'life0, 'async_trait>( &'life0 self, nodes: Vec<Node>, ) -> Pin<Box<dyn Future<Output = IndexingStream> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Provided Methods§

Source

fn batch_size(&self) -> Option<usize>

Source

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

Trait Implementations§

Source§

impl Persist for &dyn Persist

Source§

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

Source§

fn store<'life0, 'async_trait>( &'life0 self, node: Node, ) -> Pin<Box<dyn Future<Output = Result<Node>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn batch_store<'life0, 'async_trait>( &'life0 self, nodes: Vec<Node>, ) -> Pin<Box<dyn Future<Output = IndexingStream> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn batch_size(&self) -> Option<usize>

Source§

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

Source§

impl Persist for Box<dyn Persist>

Source§

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

Source§

fn store<'life0, 'async_trait>( &'life0 self, node: Node, ) -> Pin<Box<dyn Future<Output = Result<Node>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn batch_store<'life0, 'async_trait>( &'life0 self, nodes: Vec<Node>, ) -> Pin<Box<dyn Future<Output = IndexingStream> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn batch_size(&self) -> Option<usize>

Source§

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

Implementations on Foreign Types§

Source§

impl Persist for Box<dyn Persist>

Source§

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

Source§

fn store<'life0, 'async_trait>( &'life0 self, node: Node, ) -> Pin<Box<dyn Future<Output = Result<Node>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn batch_store<'life0, 'async_trait>( &'life0 self, nodes: Vec<Node>, ) -> Pin<Box<dyn Future<Output = IndexingStream> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn batch_size(&self) -> Option<usize>

Source§

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

Implementors§