pub struct Schema {
pub spec: SchemaSpec,
pub top_node_type: Option<NodeType>,
pub cached: Arc<Mutex<HashMap<String, Arc<dyn Any + Send + Sync>>>>,
pub nodes: HashMap<String, NodeType>,
pub marks: HashMap<String, MarkType>,
}
Expand description
Schema 结构体定义 用于管理文档模型的整体结构,包括节点和标记的类型定义
Fields§
§spec: SchemaSpec
Schema 的规范定义
top_node_type: Option<NodeType>
顶级节点类型
cached: Arc<Mutex<HashMap<String, Arc<dyn Any + Send + Sync>>>>
全局缓存
nodes: HashMap<String, NodeType>
节点类型映射表
marks: HashMap<String, MarkType>
标记类型映射表
Implementations§
Trait Implementations§
impl Eq for Schema
Auto Trait Implementations§
impl Freeze for Schema
impl RefUnwindSafe for Schema
impl Send for Schema
impl Sync for Schema
impl Unpin for Schema
impl UnwindSafe for Schema
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more