💥 Oculta as_ref_any() y as_mut_any() en la API
This commit is contained in:
parent
0880964fd1
commit
9a49186ed2
25 changed files with 41 additions and 196 deletions
|
|
@ -84,14 +84,6 @@ impl ComponentTrait for Anchor {
|
|||
}
|
||||
})
|
||||
}
|
||||
|
||||
fn as_ref_any(&self) -> &dyn AnyComponent {
|
||||
self
|
||||
}
|
||||
|
||||
fn as_mut_any(&mut self) -> &mut dyn AnyComponent {
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
impl Anchor {
|
||||
|
|
|
|||
|
|
@ -58,14 +58,6 @@ impl ComponentTrait for Block {
|
|||
fn after_prepare_component(&mut self, cx: &mut Context) {
|
||||
run_actions_after_prepare_block(self, cx);
|
||||
}
|
||||
|
||||
fn as_ref_any(&self) -> &dyn AnyComponent {
|
||||
self
|
||||
}
|
||||
|
||||
fn as_mut_any(&mut self) -> &mut dyn AnyComponent {
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
impl Block {
|
||||
|
|
|
|||
|
|
@ -95,14 +95,6 @@ impl ComponentTrait for Container {
|
|||
fn after_prepare_component(&mut self, cx: &mut Context) {
|
||||
run_actions_after_prepare_container(self, cx);
|
||||
}
|
||||
|
||||
fn as_ref_any(&self) -> &dyn AnyComponent {
|
||||
self
|
||||
}
|
||||
|
||||
fn as_mut_any(&mut self) -> &mut dyn AnyComponent {
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
impl Container {
|
||||
|
|
|
|||
|
|
@ -67,14 +67,6 @@ impl ComponentTrait for Button {
|
|||
}
|
||||
})
|
||||
}
|
||||
|
||||
fn as_ref_any(&self) -> &dyn AnyComponent {
|
||||
self
|
||||
}
|
||||
|
||||
fn as_mut_any(&mut self) -> &mut dyn AnyComponent {
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
impl Button {
|
||||
|
|
|
|||
|
|
@ -72,14 +72,6 @@ impl ComponentTrait for Date {
|
|||
}
|
||||
})
|
||||
}
|
||||
|
||||
fn as_ref_any(&self) -> &dyn AnyComponent {
|
||||
self
|
||||
}
|
||||
|
||||
fn as_mut_any(&mut self) -> &mut dyn AnyComponent {
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
impl Date {
|
||||
|
|
|
|||
|
|
@ -73,14 +73,6 @@ impl ComponentTrait for Form {
|
|||
fn after_prepare_component(&mut self, cx: &mut Context) {
|
||||
run_actions_after_prepare_form(self, cx);
|
||||
}
|
||||
|
||||
fn as_ref_any(&self) -> &dyn AnyComponent {
|
||||
self
|
||||
}
|
||||
|
||||
fn as_mut_any(&mut self) -> &mut dyn AnyComponent {
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
impl Form {
|
||||
|
|
|
|||
|
|
@ -29,14 +29,6 @@ impl ComponentTrait for Hidden {
|
|||
input type="hidden" id=[id] name=[self.name().get()] value=[self.value().get()];
|
||||
})
|
||||
}
|
||||
|
||||
fn as_ref_any(&self) -> &dyn AnyComponent {
|
||||
self
|
||||
}
|
||||
|
||||
fn as_mut_any(&mut self) -> &mut dyn AnyComponent {
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
impl Hidden {
|
||||
|
|
|
|||
|
|
@ -106,14 +106,6 @@ impl ComponentTrait for Input {
|
|||
}
|
||||
})
|
||||
}
|
||||
|
||||
fn as_ref_any(&self) -> &dyn AnyComponent {
|
||||
self
|
||||
}
|
||||
|
||||
fn as_mut_any(&mut self) -> &mut dyn AnyComponent {
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
impl Input {
|
||||
|
|
|
|||
|
|
@ -84,14 +84,6 @@ impl ComponentTrait for Column {
|
|||
fn after_prepare_component(&mut self, cx: &mut Context) {
|
||||
run_actions_after_prepare_column(self, cx);
|
||||
}
|
||||
|
||||
fn as_ref_any(&self) -> &dyn AnyComponent {
|
||||
self
|
||||
}
|
||||
|
||||
fn as_mut_any(&mut self) -> &mut dyn AnyComponent {
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
impl Column {
|
||||
|
|
|
|||
|
|
@ -53,14 +53,6 @@ impl ComponentTrait for Row {
|
|||
fn after_prepare_component(&mut self, cx: &mut Context) {
|
||||
run_actions_after_prepare_row(self, cx);
|
||||
}
|
||||
|
||||
fn as_ref_any(&self) -> &dyn AnyComponent {
|
||||
self
|
||||
}
|
||||
|
||||
fn as_mut_any(&mut self) -> &mut dyn AnyComponent {
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
impl Row {
|
||||
|
|
|
|||
|
|
@ -73,14 +73,6 @@ impl ComponentTrait for Heading {
|
|||
HeadingType::H6 => h6 id=[id] class=[classes] { (self.text().prepare(cx)) },
|
||||
}})
|
||||
}
|
||||
|
||||
fn as_ref_any(&self) -> &dyn AnyComponent {
|
||||
self
|
||||
}
|
||||
|
||||
fn as_mut_any(&mut self) -> &mut dyn AnyComponent {
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
impl Heading {
|
||||
|
|
|
|||
|
|
@ -37,14 +37,6 @@ impl ComponentTrait for Icon {
|
|||
fn prepare_component(&self, _: &mut Context) -> PrepareMarkup {
|
||||
PrepareMarkup::With(html! { i class=[self.classes().get()] {}; })
|
||||
}
|
||||
|
||||
fn as_ref_any(&self) -> &dyn AnyComponent {
|
||||
self
|
||||
}
|
||||
|
||||
fn as_mut_any(&mut self) -> &mut dyn AnyComponent {
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
impl Icon {
|
||||
|
|
|
|||
|
|
@ -42,14 +42,6 @@ impl ComponentTrait for Image {
|
|||
class=[self.classes().get()];
|
||||
})
|
||||
}
|
||||
|
||||
fn as_ref_any(&self) -> &dyn AnyComponent {
|
||||
self
|
||||
}
|
||||
|
||||
fn as_mut_any(&mut self) -> &mut dyn AnyComponent {
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
impl Image {
|
||||
|
|
|
|||
|
|
@ -56,14 +56,6 @@ impl ComponentTrait for Paragraph {
|
|||
}
|
||||
})
|
||||
}
|
||||
|
||||
fn as_ref_any(&self) -> &dyn AnyComponent {
|
||||
self
|
||||
}
|
||||
|
||||
fn as_mut_any(&mut self) -> &mut dyn AnyComponent {
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
impl Paragraph {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue