pub type ActorMapping = VnodeMapping<Actor>;Expand description
A mapping from VirtualNode to ActorId.
Aliased Type§
pub struct ActorMapping {
original_indices: Vec<u32>,
data: Vec<TypedId<6>>,
}Fields§
§original_indices: Vec<u32>§data: Vec<TypedId<6>>Implementations§
Source§impl ActorMapping
impl ActorMapping
Sourcepub fn to_worker_slot(
&self,
actor_to_worker: &HashMap<ActorId, WorkerId>,
) -> WorkerSlotMapping
pub fn to_worker_slot( &self, actor_to_worker: &HashMap<ActorId, WorkerId>, ) -> WorkerSlotMapping
Transform the actor mapping to the worker slot mapping. Note that the parameter is a mapping from actor to worker.
Sourcepub fn to_actor_alignment(
&self,
actor_to_worker: &HashMap<ActorId, WorkerId>,
) -> ActorAlignmentMapping
pub fn to_actor_alignment( &self, actor_to_worker: &HashMap<ActorId, WorkerId>, ) -> ActorAlignmentMapping
Transform the actor mapping to the actor alignment 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.