You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This breaks this library if I want to use with_name() or NamedView directly.
My example usage gives me this error when I try to wrap table with NamedView:
error[E0277]: the trait bound `cursive_table_view::TableView<ui::images::ImageTableRow, ui::images::ImageTableColumn>: cursive_core::view::view_wrapper::ViewWrapper` is not satisfied
--> src/ui/images.rs:81:29
|
81 | ui.add_fullscreen_layer(NamedView::new(
| _____________________________^
82 | | "images_table",
83 | | ResizedView::with_full_screen(table),
84 | | ));
| |_____^ the trait `cursive_core::view::view_wrapper::ViewWrapper` is not implemented for `cursive_table_view::TableView<ui::images::ImageTableRow, ui::images::ImageTableColumn>`
|
= note: required because of the requirements on the impl of `cursive_core::view::view_trait::View` for `cursive_table_view::TableView<ui::images::ImageTableRow, ui::images::ImageTableColumn>`
= note: required because of the requirements on the impl of `cursive_core::view::view_wrapper::ViewWrapper` for `cursive_core::views::resized_view::ResizedView<cursive_table_view::TableView<ui::images::ImageTableRow, ui::images::ImageTableColumn>>`
= note: required because of the requirements on the impl of `cursive_core::view::view_trait::View` for `cursive_core::views::resized_view::ResizedView<cursive_table_view::TableView<ui::images::ImageTableRow, ui::images::ImageTableColumn>>`
= note: required because of the requirements on the impl of `cursive_core::view::view_wrapper::ViewWrapper` for `cursive_core::views::named_view::NamedView<cursive_core::views::resized_view::ResizedView<cursive_table_view::TableView<ui::images::ImageTableRow, ui::images::ImageTableColumn>>>`
= note: required because of the requirements on the impl of `cursive_core::view::view_trait::View` for `cursive_core::views::named_view::NamedView<cursive_core::views::resized_view::ResizedView<cursive_table_view::TableView<ui::images::ImageTableRow, ui::images::ImageTableColumn>>>`
= note: required because of the requirements on the impl of `cursive_core::view::into_boxed_view::IntoBoxedView` for `cursive_core::views::named_view::NamedView<cursive_core::views::resized_view::ResizedView<cursive_table_view::TableView<ui::images::ImageTableRow, ui::images::ImageTableColumn>>>`
This is most likely a version mismatch between the version of cursive you use, and the one used in this library. The hint "ViewWrapperis not implemented" is a bit misleading;Viewis what is actually required, rustc sees thatViewWrapperimplementsView`, and that's what is offers.
Cursive library introduced new trait: https://docs.rs/cursive/0.15.0/cursive/traits/trait.Nameable.html#method.with_name
This breaks this library if I want to use
with_name()
orNamedView
directly.My example usage gives me this error when I try to wrap table with
NamedView
:I'm no expert but Cursive provides convinient macro that can help with this implementation: https://github.com/gyscos/cursive/blob/main/cursive-core/src/view/view_wrapper.rs#L13
The text was updated successfully, but these errors were encountered: