Skip to main content

IdConvert

Trait IdConvert 

Source
pub trait IdConvert: PrefixLookup + Sync {
    // Required methods
    fn vertex_id<'life0, 'async_trait>(
        &'life0 self,
        name: Vertex,
    ) -> Pin<Box<dyn Future<Output = Result<Id>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn vertex_id_with_max_group<'life0, 'life1, 'async_trait>(
        &'life0 self,
        name: &'life1 Vertex,
        max_group: Group,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Id>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn vertex_name<'life0, 'async_trait>(
        &'life0 self,
        id: Id,
    ) -> Pin<Box<dyn Future<Output = Result<Vertex>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn contains_vertex_name<'life0, 'life1, 'async_trait>(
        &'life0 self,
        name: &'life1 Vertex,
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn contains_vertex_id_locally<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 [Id],
    ) -> Pin<Box<dyn Future<Output = Result<Vec<bool>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn contains_vertex_name_locally<'life0, 'life1, 'async_trait>(
        &'life0 self,
        name: &'life1 [Vertex],
    ) -> Pin<Box<dyn Future<Output = Result<Vec<bool>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn map_id(&self) -> &str;
    fn map_version(&self) -> &VerLink;

    // Provided methods
    fn vertex_id_optional<'life0, 'life1, 'async_trait>(
        &'life0 self,
        name: &'life1 Vertex,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Id>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn vertex_name_batch<'life0, 'life1, 'async_trait>(
        &'life0 self,
        ids: &'life1 [Id],
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Result<Vertex>>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn vertex_id_batch<'life0, 'life1, 'async_trait>(
        &'life0 self,
        names: &'life1 [Vertex],
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Result<Id>>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
}
Expand description

Convert between Vertex and Id.

Required Methods§

Source

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

Source

fn vertex_id_with_max_group<'life0, 'life1, 'async_trait>( &'life0 self, name: &'life1 Vertex, max_group: Group, ) -> Pin<Box<dyn Future<Output = Result<Option<Id>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

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

Source

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

Source

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

Test if an id is present locally. Do not trigger remote fetching.

Source

fn contains_vertex_name_locally<'life0, 'life1, 'async_trait>( &'life0 self, name: &'life1 [Vertex], ) -> Pin<Box<dyn Future<Output = Result<Vec<bool>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Test if an name is present locally. Do not trigger remote fetching.

Source

fn map_id(&self) -> &str

Identity of the map.

Source

fn map_version(&self) -> &VerLink

Version of the map. Useful to figure out compatibility between two maps.

For performance, this does not include changes to the VIRTUAL group.

Provided Methods§

Source

fn vertex_id_optional<'life0, 'life1, 'async_trait>( &'life0 self, name: &'life1 Vertex, ) -> Pin<Box<dyn Future<Output = Result<Option<Id>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn vertex_name_batch<'life0, 'life1, 'async_trait>( &'life0 self, ids: &'life1 [Id], ) -> Pin<Box<dyn Future<Output = Result<Vec<Result<Vertex>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Convert Ids to Vertexs in batch.

Source

fn vertex_id_batch<'life0, 'life1, 'async_trait>( &'life0 self, names: &'life1 [Vertex], ) -> Pin<Box<dyn Future<Output = Result<Vec<Result<Id>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Convert Vertexs to Ids in batch.

Implementations on Foreign Types§

Source§

impl IdConvert for Arc<dyn IdConvert + Send + Sync>

Source§

fn vertex_id<'a: 's, 's>( &'a self, name: Vertex, ) -> Pin<Box<dyn Future<Output = Result<Id>> + Send + 's>>
where Self: 's,

Source§

fn vertex_id_with_max_group<'a: 's, 'b: 's, 's>( &'a self, name: &'b Vertex, max_group: Group, ) -> Pin<Box<dyn Future<Output = Result<Option<Id>>> + Send + 's>>
where Self: 's,

Source§

fn vertex_name<'a: 's, 's>( &'a self, id: Id, ) -> Pin<Box<dyn Future<Output = Result<Vertex>> + Send + 's>>
where Self: 's,

Source§

fn contains_vertex_name<'a: 's, 'b: 's, 's>( &'a self, name: &'b Vertex, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 's>>
where Self: 's,

Source§

fn vertex_id_optional<'a: 's, 'b: 's, 's>( &'a self, name: &'b Vertex, ) -> Pin<Box<dyn Future<Output = Result<Option<Id>>> + Send + 's>>
where Self: 's,

Source§

fn contains_vertex_id_locally<'a: 's, 'b: 's, 's>( &'a self, ids: &'b [Id], ) -> Pin<Box<dyn Future<Output = Result<Vec<bool>>> + Send + 's>>
where Self: 's,

Source§

fn contains_vertex_name_locally<'a: 's, 'b: 's, 's>( &'a self, names: &'b [Vertex], ) -> Pin<Box<dyn Future<Output = Result<Vec<bool>>> + Send + 's>>
where Self: 's,

Source§

fn vertex_name_batch<'a: 's, 'b: 's, 's>( &'a self, ids: &'b [Id], ) -> Pin<Box<dyn Future<Output = Result<Vec<Result<Vertex>>>> + Send + 's>>
where Self: 's,

Source§

fn vertex_id_batch<'a: 's, 'b: 's, 's>( &'a self, names: &'b [Vertex], ) -> Pin<Box<dyn Future<Output = Result<Vec<Result<Id>>>> + Send + 's>>
where Self: 's,

Source§

fn map_id(&self) -> &str

Source§

fn map_version(&self) -> &VerLink

Implementors§

Source§

impl IdConvert for IdMap

Source§

impl IdConvert for MemIdMap

Source§

impl<IS, M, P, S> IdConvert for AbstractDag<IdDag<IS>, M, P, S>
where IS: IdDagStore, IdDag<IS>: TryClone, M: IdConvert + TryClone + Send + Sync + 'static, P: TryClone + Send + Sync + 'static, S: TryClone + Send + Sync + 'static,