pub struct Layer<T: View> { /* private fields */ }
Expand description
Wrapper view that fills the background.
Used as layer in the StackView
.
Implementations
Trait Implementations
sourceimpl<T: View> ViewWrapper for Layer<T>
impl<T: View> ViewWrapper for Layer<T>
type V = T
type V = T
Type that this view wraps.
sourcefn with_view<F, R>(&self, f: F) -> Option<R>where
F: FnOnce(&Self::V) -> R,
fn with_view<F, R>(&self, f: F) -> Option<R>where
F: FnOnce(&Self::V) -> R,
Runs a function on the inner view, returning the result. Read more
sourcefn with_view_mut<F, R>(&mut self, f: F) -> Option<R>where
F: FnOnce(&mut Self::V) -> R,
fn with_view_mut<F, R>(&mut self, f: F) -> Option<R>where
F: FnOnce(&mut Self::V) -> R,
Runs a function on the inner view, returning the result. Read more
sourcefn into_inner(self) -> Result<Self::V, Self>where
Self::V: Sized,
fn into_inner(self) -> Result<Self::V, Self>where
Self::V: Sized,
Attempts to retrieve the inner view.
sourcefn wrap_required_size(&mut self, req: Vec2) -> Vec2
fn wrap_required_size(&mut self, req: Vec2) -> Vec2
Wraps the
required_size
method.sourcefn wrap_on_event(&mut self, ch: Event) -> EventResult
fn wrap_on_event(&mut self, ch: Event) -> EventResult
Wraps the
on_event
method.sourcefn wrap_layout(&mut self, size: Vec2)
fn wrap_layout(&mut self, size: Vec2)
Wraps the
layout
method.sourcefn wrap_take_focus(&mut self, source: Direction) -> bool
fn wrap_take_focus(&mut self, source: Direction) -> bool
Wraps the
take_focus
method.sourcefn wrap_call_on_any<'a>(&mut self, selector: &Selector<'_>, callback: AnyCb<'a>)
fn wrap_call_on_any<'a>(&mut self, selector: &Selector<'_>, callback: AnyCb<'a>)
Wraps the
find
method.sourcefn wrap_focus_view(&mut self, selector: &Selector<'_>) -> Result<(), ()>
fn wrap_focus_view(&mut self, selector: &Selector<'_>) -> Result<(), ()>
Wraps the
focus_view
method.sourcefn wrap_needs_relayout(&self) -> bool
fn wrap_needs_relayout(&self) -> bool
Wraps the
needs_relayout
method.sourcefn wrap_important_area(&self, size: Vec2) -> Rect
fn wrap_important_area(&self, size: Vec2) -> Rect
Wraps the
important_area
method.Auto Trait Implementations
impl<T> RefUnwindSafe for Layer<T>where
T: RefUnwindSafe,
impl<T> Send for Layer<T>where
T: Send,
impl<T> Sync for Layer<T>where
T: Sync,
impl<T> Unpin for Layer<T>where
T: Unpin,
impl<T> UnwindSafe for Layer<T>where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more