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§
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>,
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.