Trait IdMapWrite

Source
pub trait IdMapWrite {
    // Required methods
    fn insert<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        id: Id,
        name: &'life1 [u8],
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn remove_range<'life0, 'async_trait>(
        &'life0 mut self,
        low: Id,
        high: Id,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<VertexName>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Write operations for IdMap.

Required Methods§

Source

fn insert<'life0, 'life1, 'async_trait>( &'life0 mut self, id: Id, name: &'life1 [u8], ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Insert a new (id, name) pair to the map.

The id and name mapping should be unique, it’s an error to map an id to multiple names, or map a name to multiple ids. Note: older versions of IdMap allowed mapping a name to a non-master Id, then a master Id (in this order), and the master Id is used for lookups. This is no longer permitted.

Source

fn remove_range<'life0, 'async_trait>( &'life0 mut self, low: Id, high: Id, ) -> Pin<Box<dyn Future<Output = Result<Vec<VertexName>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Remove ids in the range low..=high and their associated names. Return removed names.

Implementors§