Trait nuit_core::ViewExt

source ·
pub trait ViewExt: Sized {
    // Provided methods
    fn modifier(self, modifier: ModifierNode) -> Modified<Self> { ... }
    fn overlay_at<O>(
        self,
        alignment: Alignment,
        overlayed: O,
    ) -> Overlay<Self, O> { ... }
    fn overlay<O>(self, overlayed: O) -> Overlay<Self, O> { ... }
    fn padding(self, insets: impl Into<Insets>) -> Modified<Self> { ... }
    fn position(self, position: Vec2<f64>) -> Modified<Self> { ... }
    fn frame(self, frame: impl Into<Frame>) -> Modified<Self> { ... }
    fn on_appear(
        self,
        action: impl Fn() + 'static,
    ) -> Handler<Self, impl Fn(Event)> { ... }
    fn on_disappear(
        self,
        action: impl Fn() + 'static,
    ) -> Handler<Self, impl Fn(Event)> { ... }
}
Expand description

An extension trait with various convenience methods for views.

Provided Methods§

source

fn modifier(self, modifier: ModifierNode) -> Modified<Self>

source

fn overlay_at<O>(self, alignment: Alignment, overlayed: O) -> Overlay<Self, O>

source

fn overlay<O>(self, overlayed: O) -> Overlay<Self, O>

source

fn padding(self, insets: impl Into<Insets>) -> Modified<Self>

source

fn position(self, position: Vec2<f64>) -> Modified<Self>

source

fn frame(self, frame: impl Into<Frame>) -> Modified<Self>

source

fn on_appear(self, action: impl Fn() + 'static) -> Handler<Self, impl Fn(Event)>

source

fn on_disappear( self, action: impl Fn() + 'static, ) -> Handler<Self, impl Fn(Event)>

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> ViewExt for T
where T: View,