pub struct Node<T> {
pub scope_id: ScopeId,
pub parent: NodeKey,
pub children: Vec<NodeKey>,
pub data: Option<T>,
}Fields§
§scope_id: ScopeId§parent: NodeKey§children: Vec<NodeKey>§data: Option<T>Trait Implementations§
Source§impl<T> ComposeNode for Node<T>where
T: NodeData,
impl<T> ComposeNode for Node<T>where
T: NodeData,
type Context = <T as NodeData>::Context
type Data = T
fn new(scope_id: ScopeId, parent: NodeKey) -> Self
fn as_any(&self) -> &dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
fn scope_id(&self) -> ScopeId
fn set_scope_id(&mut self, scope_id: ScopeId)
fn parent(&self) -> NodeKey
fn set_parent(&mut self, parent: NodeKey)
fn data(&self) -> Option<&Self::Data>
fn data_mut(&mut self) -> Option<&mut Self::Data>
fn set_data(&mut self, data: Self::Data)
fn children(&self) -> &[NodeKey]
fn children_mut(&mut self) -> &mut [NodeKey]
fn children_push(&mut self, node_key: NodeKey)
fn children_len(&self) -> usize
fn children_drain<R>(&mut self, range: R) -> Drain<'_, NodeKey>where
R: RangeBounds<usize>,
impl<T: Eq> Eq for Node<T>
impl<T> StructuralPartialEq for Node<T>
Auto Trait Implementations§
impl<T> Freeze for Node<T>where
T: Freeze,
impl<T> RefUnwindSafe for Node<T>where
T: RefUnwindSafe,
impl<T> Send for Node<T>where
T: Send,
impl<T> Sync for Node<T>where
T: Sync,
impl<T> Unpin for Node<T>where
T: Unpin,
impl<T> UnwindSafe for Node<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