|
|
@ -182,10 +182,8 @@ pub trait AnyComponent {
|
|
|
|
/// # Examples
|
|
|
|
/// # Examples
|
|
|
|
///
|
|
|
|
///
|
|
|
|
/// ```rust
|
|
|
|
/// ```rust
|
|
|
|
/// # use cursive_core::views::TextComponent;
|
|
|
|
/// // let boxed: Box<Component> = Box::new(TextComponent::new("text"));
|
|
|
|
/// # use cursive_core::view::Component;
|
|
|
|
/// // let text: Box<TextComponent> = boxed.as_boxed_any().downcast().unwrap();
|
|
|
|
/// let boxed: Box<Component> = Box::new(TextComponent::new("text"));
|
|
|
|
|
|
|
|
/// let text: Box<TextComponent> = boxed.as_boxed_any().downcast().unwrap();
|
|
|
|
|
|
|
|
/// ```
|
|
|
|
/// ```
|
|
|
|
fn as_boxed_any(self: Box<Self>) -> Box<dyn Any>;
|
|
|
|
fn as_boxed_any(self: Box<Self>) -> Box<dyn Any>;
|
|
|
|
}
|
|
|
|
}
|
|
|
|