pub struct ClipRect<A = ()> { /* private fields */ }Expand description
Clips one child to this wrapper’s resolved logical-pixel bounds.
The child uses the incoming constraints. With no child, the wrapper resolves constrained zero size. The clip is not a window-root clip.
§Examples
use ailloli_ui_widgets::{layout::ClipRect, text::Text};
let clip: ClipRect<()> = ClipRect::new().child(Text::new("visible portion"));
let _ = clip;Implementations§
Trait Implementations§
Source§impl<A: 'static> Default for ClipRect<A>
Creates the same empty clip as ClipRect::new.
impl<A: 'static> Default for ClipRect<A>
Creates the same empty clip as ClipRect::new.
Auto Trait Implementations§
impl<A> Freeze for ClipRect<A>
impl<A = ()> !RefUnwindSafe for ClipRect<A>
impl<A = ()> !Send for ClipRect<A>
impl<A = ()> !Sync for ClipRect<A>
impl<A> Unpin for ClipRect<A>
impl<A = ()> !UnwindSafe for ClipRect<A>
Blanket Implementations§
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<T, A> FlexItemExt<A> for Twhere
T: IntoView<A>,
impl<T, A> FlexItemExt<A> for Twhere
T: IntoView<A>,
Source§fn flex_grow_by(self, value: f32) -> View<A>
fn flex_grow_by(self, value: f32) -> View<A>
Sets the dimensionless flex-grow weight. Read more
Source§fn flex_shrink(self, value: f32) -> View<A>
fn flex_shrink(self, value: f32) -> View<A>
Sets the dimensionless flex-shrink weight. Read more
Source§fn flex_basis(self, value: impl Into<Length>) -> View<A>
fn flex_basis(self, value: impl Into<Length>) -> View<A>
Sets the preferred main-axis flex basis. Read more
Source§fn align_self(self, value: AlignItems) -> View<A>
fn align_self(self, value: AlignItems) -> View<A>
Overrides the parent cross-axis alignment for this view. Read more
Source§fn fill_width(self) -> View<A>
fn fill_width(self) -> View<A>
Marks width as parent-fill in the view size hint. Read more
Source§fn fill_height(self) -> View<A>
fn fill_height(self) -> View<A>
Marks height as parent-fill in the view size hint. Read more