pub type ActorMapping = VnodeMapping<Actor>;
Expand description
A mapping from VirtualNode
to ActorId
.
Aliased Type§
struct ActorMapping {
original_indices: Vec<u32>,
data: Vec<u32>,
}
Fields§
§original_indices: Vec<u32>
§data: Vec<u32>
Implementations§
source§impl ActorMapping
impl ActorMapping
sourcepub fn to_worker_slot(
&self,
actor_to_worker: &HashMap<ActorId, u32>,
) -> WorkerSlotMapping
pub fn to_worker_slot( &self, actor_to_worker: &HashMap<ActorId, u32>, ) -> WorkerSlotMapping
Transform the actor mapping to the worker slot mapping. Note that the parameter is a mapping from actor to worker.
sourcepub fn from_protobuf(proto: &ActorMappingProto) -> Self
pub fn from_protobuf(proto: &ActorMappingProto) -> Self
Create an actor mapping from the protobuf representation.
sourcepub fn to_protobuf(&self) -> ActorMappingProto
pub fn to_protobuf(&self) -> ActorMappingProto
Convert this actor mapping to the protobuf representation.