pub struct Node {
pub id: NodeId,
pub type: String,
pub attrs: Attrs,
pub content: Vector<NodeId>,
pub marks: Vector<Mark>,
}
Expand description
Fields§
§id: NodeId
§type: String
§attrs: Attrs
§content: Vector<NodeId>
§marks: Vector<Mark>
Implementations§
Trait Implementations§
Source§impl<'a> Add<Node> for NodeRef<'a>
为 NodeRef 实现自定义的 + 运算符,用于添加单个节点
当使用 + 运算符时,会将新节点添加到当前节点的子节点列表中
impl<'a> Add<Node> for NodeRef<'a>
为 NodeRef 实现自定义的 + 运算符,用于添加单个节点 当使用 + 运算符时,会将新节点添加到当前节点的子节点列表中
Source§impl<'de> Deserialize<'de> for Node
impl<'de> Deserialize<'de> for Node
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'a> Shl<Node> for NodeRef<'a>
为 NodeRef 实现自定义的 << 运算符,用于在子节点列表开头插入单个节点
当使用 << 运算符时,会将新节点插入到当前节点的子节点列表的开头位置
impl<'a> Shl<Node> for NodeRef<'a>
为 NodeRef 实现自定义的 << 运算符,用于在子节点列表开头插入单个节点 当使用 << 运算符时,会将新节点插入到当前节点的子节点列表的开头位置
Source§impl<'a> Shr<Node> for NodeRef<'a>
为 NodeRef 实现自定义的 >> 运算符,用于在子节点列表末尾添加单个节点
当使用 >> 运算符时,会将新节点添加到当前节点的子节点列表的末尾位置
impl<'a> Shr<Node> for NodeRef<'a>
为 NodeRef 实现自定义的 >> 运算符,用于在子节点列表末尾添加单个节点 当使用 >> 运算符时,会将新节点添加到当前节点的子节点列表的末尾位置
impl Send for Node
impl StructuralPartialEq for Node
impl Sync for Node
Auto Trait Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more