pub struct MemIdMap { /* private fields */ }Expand description
Bi-directional mapping between an integer id and a name ([u8]).
Private. Stored in memory.
Implementations§
Trait Implementations§
Source§impl IdConvert for MemIdMap
impl IdConvert for MemIdMap
fn vertex_id<'life0, 'async_trait>(
&'life0 self,
name: VertexName,
) -> 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 VertexName,
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<VertexName>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn contains_vertex_name<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 VertexName,
) -> 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,
ids: &'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_id_locally<'life0, 'life1, 'async_trait>(
&'life0 self,
ids: &'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,
names: &'life1 [VertexName],
) -> 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,
names: &'life1 [VertexName],
) -> 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_version(&self) -> &VerLink
fn map_version(&self) -> &VerLink
Version of the map. Useful to figure out compatibility between two maps.
fn vertex_id_optional<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 VertexName,
) -> 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<VertexName>>>> + 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<VertexName>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Convert
Ids to VertexNames in batch.Source§fn vertex_id_batch<'life0, 'life1, 'async_trait>(
&'life0 self,
names: &'life1 [VertexName],
) -> Pin<Box<dyn Future<Output = Result<Vec<Result<Id>>>> + 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 [VertexName],
) -> Pin<Box<dyn Future<Output = Result<Vec<Result<Id>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Convert
VertexNames to Ids in batch.Source§impl IdMapWrite for MemIdMap
impl IdMapWrite for MemIdMap
Source§impl Persist for MemIdMap
impl Persist for MemIdMap
Source§impl PrefixLookup for MemIdMap
impl PrefixLookup for MemIdMap
Auto Trait Implementations§
impl Freeze for MemIdMap
impl !RefUnwindSafe for MemIdMap
impl Send for MemIdMap
impl Sync for MemIdMap
impl Unpin for MemIdMap
impl !UnwindSafe for MemIdMap
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IdMapAssignHead for Twhere
T: IdConvert + IdMapWrite,
impl<T> IdMapAssignHead for Twhere
T: IdConvert + IdMapWrite,
Source§fn assign_head<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
head: VertexName,
parents_by_name: &'life1 dyn Parents,
group: Group,
covered_ids: &'life2 mut IdSet,
reserved_ids: &'life3 IdSet,
) -> Pin<Box<dyn Future<Output = Result<PreparedFlatSegments>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn assign_head<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
head: VertexName,
parents_by_name: &'life1 dyn Parents,
group: Group,
covered_ids: &'life2 mut IdSet,
reserved_ids: &'life3 IdSet,
) -> Pin<Box<dyn Future<Output = Result<PreparedFlatSegments>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Assign an id for a head in a DAG. This implies ancestors of the
head will also have ids assigned. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more