feat: impl `Display` for `ShardId`

pull/24376/head
Marco Neumann 2021-11-05 12:06:13 +01:00
parent fc4ea71921
commit c1fa41196d
1 changed files with 6 additions and 0 deletions

View File

@ -19,6 +19,12 @@ impl ShardId {
}
}
impl std::fmt::Display for ShardId {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ShardId({})", self.get())
}
}
/// ShardConfig defines rules for assigning a line/row to an individual
/// host or a group of hosts. A shard
/// is a logical concept, but the usage is meant to split data into