pub trait SubRingManager<A>: ChordStorage<A> {
    fn get_subring<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 Did
    ) -> Pin<Box<dyn Future<Output = Result<SubRing>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; fn get_subring_by_name<'life0, 'life1, 'async_trait>(
        &'life0 self,
        name: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<SubRing>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; fn store_subring<'life0, 'life1, 'async_trait>(
        &'life0 self,
        subring: &'life1 SubRing
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; fn join_subring<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        id: &'life1 Did,
        rid: &'life2 Did
    ) -> Pin<Box<dyn Future<Output = Result<A>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
; fn cloest_preceding_node_for_subring<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        id: &'life1 Did,
        rid: &'life2 Did
    ) -> Pin<Box<dyn Future<Output = Option<Result<Did>>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
; }
Expand description

Trait for how dht manage SubRing

Required Methods

get subring from storage by id

get subring from storage by name

store a subring to storage

get a subring for update join a node to subring via given name When Node A join Channel C which’s vnode is stored on Node B A send JoinSubRing to Address C, Node B got the Message And Update the Chord Finger Table, then, Node B Response it’s finger table to A And Noti closest preceding node that A is Joined

search a cloest preceding node

Implementors