diff options
Diffstat (limited to 'minecraft-chat/src/base_component.rs')
| -rw-r--r-- | minecraft-chat/src/base_component.rs | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/minecraft-chat/src/base_component.rs b/minecraft-chat/src/base_component.rs index 2ed5646d..30e66173 100644 --- a/minecraft-chat/src/base_component.rs +++ b/minecraft-chat/src/base_component.rs @@ -1,6 +1,17 @@ -use crate::component::Component; +use crate::{component::Component, style::Style}; -pub trait BaseComponent { - const siblings: Vec<Component>; - // style: +#[derive(Clone)] +pub struct BaseComponent { + // implements mutablecomponent + pub siblings: Vec<Component>, + pub style: Style, +} + +impl BaseComponent { + pub fn new() -> Self { + Self { + siblings: Vec::new(), + style: Style::new(), + } + } } |
