pub trait ViewExt: Sized {
Show 22 methods
// Provided methods
fn modifier(self, modifier: ModifierNode) -> Modified<Self> { ... }
fn gesture<G>(self, gesture: G) -> Gestured<Self, G>
where G: Gesture { ... }
fn on_taps<F>(
self,
count: usize,
action: F,
) -> Gestured<Self, TapGesture<F>>
where F: Fn() { ... }
fn on_tap<F>(self, action: F) -> Gestured<Self, TapGesture<F>>
where F: Fn() { ... }
fn on_drag_by<F>(
self,
minimum_distance: impl Into<f64>,
action: F,
) -> Gestured<Self, DragGesture<F>>
where F: Fn(&DragEvent) { ... }
fn on_drag<F>(self, action: F) -> Gestured<Self, DragGesture<F>>
where F: Fn(&DragEvent) { ... }
fn overlay_at<O>(
self,
alignment: Alignment,
overlayed: O,
) -> Overlay<Self, O>
where O: View { ... }
fn overlay<O>(self, overlayed: O) -> Overlay<Self, O>
where O: View { ... }
fn padding(self, insets: impl Into<Insets>) -> Modified<Self> { ... }
fn position(self, position: Vec2<f64>) -> Modified<Self> { ... }
fn offset(self, delta: Vec2<f64>) -> Modified<Self> { ... }
fn opacity(self, opacity: impl Into<f64>) -> Modified<Self> { ... }
fn frame_with(
self,
alignment: Alignment,
frame: impl Into<Frame>,
) -> Modified<Self> { ... }
fn frame(self, frame: impl Into<Frame>) -> Modified<Self> { ... }
fn font(self, font: impl Into<Font>) -> Modified<Self> { ... }
fn foreground_style(self, style: impl Into<Style>) -> Modified<Self> { ... }
fn scale_effect_around(
self,
anchor: UnitPoint,
factor: impl Into<f64>,
) -> Modified<Self> { ... }
fn scale_effect(self, factor: impl Into<f64>) -> Modified<Self> { ... }
fn rotation_effect_around(
self,
anchor: UnitPoint,
angle: impl Into<Angle>,
) -> Modified<Self> { ... }
fn rotation_effect(self, angle: impl Into<Angle>) -> 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§
fn modifier(self, modifier: ModifierNode) -> Modified<Self>
fn gesture<G>(self, gesture: G) -> Gestured<Self, G>where
G: Gesture,
fn on_taps<F>(self, count: usize, action: F) -> Gestured<Self, TapGesture<F>>where
F: Fn(),
fn on_tap<F>(self, action: F) -> Gestured<Self, TapGesture<F>>where
F: Fn(),
fn on_drag_by<F>( self, minimum_distance: impl Into<f64>, action: F, ) -> Gestured<Self, DragGesture<F>>
fn on_drag<F>(self, action: F) -> Gestured<Self, DragGesture<F>>
fn overlay_at<O>(self, alignment: Alignment, overlayed: O) -> Overlay<Self, O>where
O: View,
fn overlay<O>(self, overlayed: O) -> Overlay<Self, O>where
O: View,
fn padding(self, insets: impl Into<Insets>) -> Modified<Self>
fn position(self, position: Vec2<f64>) -> Modified<Self>
fn offset(self, delta: Vec2<f64>) -> Modified<Self>
fn opacity(self, opacity: impl Into<f64>) -> Modified<Self>
fn frame_with( self, alignment: Alignment, frame: impl Into<Frame>, ) -> Modified<Self>
fn frame(self, frame: impl Into<Frame>) -> Modified<Self>
fn font(self, font: impl Into<Font>) -> Modified<Self>
fn foreground_style(self, style: impl Into<Style>) -> Modified<Self>
fn scale_effect_around( self, anchor: UnitPoint, factor: impl Into<f64>, ) -> Modified<Self>
fn scale_effect(self, factor: impl Into<f64>) -> Modified<Self>
fn rotation_effect_around( self, anchor: UnitPoint, angle: impl Into<Angle>, ) -> Modified<Self>
fn rotation_effect(self, angle: impl Into<Angle>) -> 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)>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.