pub struct Rect {
pub common: Common,
}Fields§
§common: CommonImplementations§
Source§impl Rect
impl Rect
pub fn new() -> Rect
pub fn width(self, width: f32) -> Rect
pub fn height(self, height: f32) -> Rect
pub fn flex(self, factor: f32) -> Rect
pub fn padding(self, padding: f32) -> Rect
pub fn overflow(self, overflow: Overflow) -> Rect
pub fn background(self, color: Color) -> Rect
pub fn border(self, border: Border) -> Rect
Sourcepub fn keep_with_next(self) -> Rect
pub fn keep_with_next(self) -> Rect
See plan/05-overflow-and-robustness.md Grundprinzip 9: only
placed on a page if the following sibling also still fits.
Trait Implementations§
Source§impl Layoutable for Rect
impl Layoutable for Rect
fn measure(&self, _ctx: &LayoutCtx<'_>, constraints: Constraints) -> Size
fn layout( &self, _ctx: &LayoutCtx<'_>, area: Rect, _warnings: &mut Vec<LayoutWarning>, _page: usize, ) -> LayoutResult
Auto Trait Implementations§
impl Freeze for Rect
impl RefUnwindSafe for Rect
impl Send for Rect
impl Sync for Rect
impl Unpin for Rect
impl UnsafeUnpin for Rect
impl UnwindSafe for Rect
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