pub struct AnchoredRect { /* private fields */ }Expand description
One anchor’s complete logical rectangle and its visible intersection.
The logical rectangle is stated relative to the resolved view’s own
top-left cell. It is translated but never clipped or rounded onto an edge.
visible separately reports what survived Block, Canvas,
Viewport, and final safety clips.
Implementations§
Source§impl AnchoredRect
impl AnchoredRect
pub const fn width(&self) -> usize
pub const fn height(&self) -> usize
Sourcepub const fn is_empty(&self) -> bool
pub const fn is_empty(&self) -> bool
Returns whether the region covers no cells, as a cursor anchor does.
Sourcepub const fn is_within_resolved_view(&self) -> bool
pub const fn is_within_resolved_view(&self) -> bool
Returns whether the ResolvedView this came from contains the whole
region.
A partially visible or outside region returns false. A zero-sized cursor point returns true only when it lies inside every half-open clip; a point on the right or bottom edge is outside.
Sourcepub const fn visible(&self) -> Option<VisibleRect>
pub const fn visible(&self) -> Option<VisibleRect>
The part of the logical rectangle that survived every enclosing clip.
Trait Implementations§
Source§impl Clone for AnchoredRect
impl Clone for AnchoredRect
Source§fn clone(&self) -> AnchoredRect
fn clone(&self) -> AnchoredRect
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AnchoredRect
impl Debug for AnchoredRect
Source§impl PartialEq for AnchoredRect
impl PartialEq for AnchoredRect
Source§fn eq(&self, other: &AnchoredRect) -> bool
fn eq(&self, other: &AnchoredRect) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for AnchoredRect
impl Eq for AnchoredRect
impl StructuralPartialEq for AnchoredRect
Auto Trait Implementations§
impl Freeze for AnchoredRect
impl RefUnwindSafe for AnchoredRect
impl Send for AnchoredRect
impl Sync for AnchoredRect
impl Unpin for AnchoredRect
impl UnsafeUnpin for AnchoredRect
impl UnwindSafe for AnchoredRect
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