diff options
| author | mat <github@matdoes.dev> | 2021-12-08 22:09:24 +0000 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2021-12-08 22:09:24 +0000 |
| commit | 8bc1fd23991539eb8b01fc940b1219786ae5f32b (patch) | |
| tree | d544a4a5dca863c56ece143f201f07445e7cbf4a /minecraft-chat/src/base_component.rs | |
| parent | c16d55ccddd741057bf532bd946b2854dc208c65 (diff) | |
| download | azalea-drasl-8bc1fd23991539eb8b01fc940b1219786ae5f32b.tar.xz | |
minecraft-chat compiles
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(), + } + } } |
