How to Eliminate the Copy of schema.name in the Following Code
原文英文,约100词,阅读约需1分钟。发表于: 。#[derive(Debug, Clone)] pub struct Schema { name: String, sections: Vec<String>, } pub struct SchemaRegistry(HashMap<String, Schema>); impl SchemaRegistry { pub fn new() -> Self { ...
文章介绍了Rust语言中的Schema和SchemaRegistry结构体,Schema包含名称和部分,SchemaRegistry用于注册多个Schema。