Struct termit::widget::WidgetBinder
source · pub struct WidgetBinder<W, M, A: AppEvent> {
pub bound_widget: W,
/* private fields */
}
Expand description
Property binding widget decorator.
Use it with the
crate::widget::WidgetExt::bind_with()
,
crate::widget::WidgetExt::load_with()
,
crate::widget::WidgetExt::save_with()
extensions.
Fields§
§bound_widget: W
Trait Implementations§
source§impl<'a, W, M, A: AppEvent> AnchorPlacementEnabled for WidgetBinder<W, M, A>
impl<'a, W, M, A: AppEvent> AnchorPlacementEnabled for WidgetBinder<W, M, A>
source§fn place(self) -> PlacedWidget<Self>
fn place(self) -> PlacedWidget<Self>
Enabling method called by the related AnchorPlaced impl
source§impl<W: Default, M: Default, A: Default + AppEvent> Default for WidgetBinder<W, M, A>
impl<W: Default, M: Default, A: Default + AppEvent> Default for WidgetBinder<W, M, A>
source§fn default() -> WidgetBinder<W, M, A>
fn default() -> WidgetBinder<W, M, A>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<W, M, A> !RefUnwindSafe for WidgetBinder<W, M, A>
impl<W, M, A> !Send for WidgetBinder<W, M, A>
impl<W, M, A> !Sync for WidgetBinder<W, M, A>
impl<W, M, A> Unpin for WidgetBinder<W, M, A>where W: Unpin,
impl<W, M, A> !UnwindSafe for WidgetBinder<W, M, A>
Blanket Implementations§
source§impl<T> AnchorPlaced for Twhere
T: AnchorPlacementEnabled,
impl<T> AnchorPlaced for Twhere T: AnchorPlacementEnabled,
type Placed = PlacedWidget<T>
source§fn left(self, offset: impl Into<Option<u16>>) -> <T as AnchorPlaced>::Placed
fn left(self, offset: impl Into<Option<u16>>) -> <T as AnchorPlaced>::Placed
how far from the left?
source§fn top(self, offset: impl Into<Option<u16>>) -> <T as AnchorPlaced>::Placed
fn top(self, offset: impl Into<Option<u16>>) -> <T as AnchorPlaced>::Placed
how far from the top?
source§fn right(self, offset: impl Into<Option<u16>>) -> <T as AnchorPlaced>::Placed
fn right(self, offset: impl Into<Option<u16>>) -> <T as AnchorPlaced>::Placed
how far from the right?
source§fn bottom(self, offset: impl Into<Option<u16>>) -> <T as AnchorPlaced>::Placed
fn bottom(self, offset: impl Into<Option<u16>>) -> <T as AnchorPlaced>::Placed
how far from the botton?
source§fn fill(self) -> <T as AnchorPlaced>::Placed
fn fill(self) -> <T as AnchorPlaced>::Placed
reset to fill the whole area
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<'a, T, M, A> WidgetExt<M, A> for Twhere
A: AppEvent,
T: Widget<M, A>,
impl<'a, T, M, A> WidgetExt<M, A> for Twhere A: AppEvent, T: Widget<M, A>,
source§fn bind_with(
self,
loader: impl Fn(&mut T, &M) + 'static,
saver: impl Fn(&T, &mut M) + 'static
) -> WidgetBinder<T, M, A>
fn bind_with( self, loader: impl Fn(&mut T, &M) + 'static, saver: impl Fn(&T, &mut M) + 'static ) -> WidgetBinder<T, M, A>
Decorate the given widget with a loader and saver. Read more
fn replace_with( self, loader: impl Fn(T, &M) -> T + 'static ) -> WidgetBinder<T, M, A>where T: Default,
source§fn load_with(
self,
loader: impl Fn(&mut T, &M) + 'static
) -> WidgetBinder<T, M, A>
fn load_with( self, loader: impl Fn(&mut T, &M) + 'static ) -> WidgetBinder<T, M, A>
A variation on
bind_with
, only a loader