mirror of
https://github.com/danbulant/mangui
synced 2026-06-21 15:41:58 +00:00
12 lines
No EOL
356 B
Rust
12 lines
No EOL
356 B
Rust
use mangui::SharedNode;
|
|
|
|
/// A rusalka component
|
|
pub trait Component {
|
|
type ComponentAttrs;
|
|
fn new(attr: Self::ComponentAttrs) -> Self;
|
|
fn get(&self) -> &Self::ComponentAttrs;
|
|
fn set(&mut self, attr: Self::ComponentAttrs);
|
|
fn mount(&self, parent: &SharedNode, before: Option<&SharedNode>);
|
|
fn update(&self);
|
|
fn unmount(&self);
|
|
} |