pub struct YjsNode<T> {
pub id: PositionId,
pub value: T,
pub parent: Option<PositionId>,
pub children: Vec<PositionId>,
pub visible: bool,
}Expand description
Yjs-style tree node
Fields§
§id: PositionIdUnique node identifier
value: TNode value
parent: Option<PositionId>Parent node ID
children: Vec<PositionId>Child node IDs
visible: boolWhether the node is visible (not deleted)
Implementations§
Source§impl<T> YjsNode<T>
impl<T> YjsNode<T>
Sourcepub fn new(id: PositionId, value: T, parent: Option<PositionId>) -> Self
pub fn new(id: PositionId, value: T, parent: Option<PositionId>) -> Self
Create a new Yjs node
Trait Implementations§
Source§impl<'de, T> Deserialize<'de> for YjsNode<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for YjsNode<T>where
T: Deserialize<'de>,
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
impl<T> StructuralPartialEq for YjsNode<T>
Auto Trait Implementations§
impl<T> Freeze for YjsNode<T>where
T: Freeze,
impl<T> RefUnwindSafe for YjsNode<T>where
T: RefUnwindSafe,
impl<T> Send for YjsNode<T>where
T: Send,
impl<T> Sync for YjsNode<T>where
T: Sync,
impl<T> Unpin for YjsNode<T>where
T: Unpin,
impl<T> UnwindSafe for YjsNode<T>where
T: UnwindSafe,
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