♻️ Rename types for Mixed and Typed components

This commit is contained in:
Manuel Cillero 2024-03-07 21:27:36 +01:00
parent 57e71a9399
commit c65ac74a6f
20 changed files with 151 additions and 154 deletions

View file

@ -8,7 +8,7 @@ pub struct Block {
renderable: Renderable,
classes : OptionClasses,
title : OptionTranslated,
stuff : MixedComponents,
mixed : MixedComponents,
}
impl ComponentTrait for Block {
@ -78,13 +78,13 @@ impl Block {
#[rustfmt::skip]
pub fn add_component(mut self, component: impl ComponentTrait) -> Self {
self.stuff.alter_value(OneOp::Add(OneComponent::with(component)));
self.mixed.alter_value(MixedOp::Add(AnyComponent::with(component)));
self
}
#[fn_builder]
pub fn alter_components(&mut self, op: OneOp) -> &mut Self {
self.stuff.alter_value(op);
pub fn alter_components(&mut self, op: MixedOp) -> &mut Self {
self.mixed.alter_value(op);
self
}
@ -95,6 +95,6 @@ impl Block {
}
pub fn components(&self) -> &MixedComponents {
&self.stuff
&self.mixed
}
}