cruster 0.0.27

A Rust framework for building distributed, stateful entity systems with durable workflows
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use super::ShardId;
use serde::{Deserialize, Serialize};
use std::fmt;

/// Address of a singleton within the cluster.
#[derive(Debug, Clone, Hash, Eq, PartialEq, Serialize, Deserialize)]
pub struct SingletonAddress {
    pub shard_id: ShardId,
    pub name: String,
}

impl fmt::Display for SingletonAddress {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        write!(f, "{}/{}", self.shard_id, self.name)
    }
}