compose_rt

Trait ComposeNode

Source
pub trait ComposeNode: 'static {
    type Context;
    type Data;

Show 15 methods // Required methods 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>;
}

Required Associated Types§

Required Methods§

Source

fn new(scope_id: ScopeId, parent: NodeKey) -> Self

Source

fn as_any(&self) -> &dyn Any

Source

fn as_any_mut(&mut self) -> &mut dyn Any

Source

fn scope_id(&self) -> ScopeId

Source

fn set_scope_id(&mut self, scope_id: ScopeId)

Source

fn parent(&self) -> NodeKey

Source

fn set_parent(&mut self, parent: NodeKey)

Source

fn data(&self) -> Option<&Self::Data>

Source

fn data_mut(&mut self) -> Option<&mut Self::Data>

Source

fn set_data(&mut self, data: Self::Data)

Source

fn children(&self) -> &[NodeKey]

Source

fn children_mut(&mut self) -> &mut [NodeKey]

Source

fn children_push(&mut self, node_key: NodeKey)

Source

fn children_len(&self) -> usize

Source

fn children_drain<R>(&mut self, range: R) -> Drain<'_, NodeKey>
where R: RangeBounds<usize>,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T> ComposeNode for Node<T>
where T: NodeData,