Skip to main content

IntoPoint

Trait IntoPoint 

pub trait IntoPoint {
    // Required method
    fn into_point(self) -> Result<Point, Error>;
}
Expand description

A target that can be lowered to a screen Point.

Implemented for:

  • Point and (i32, i32) — used as-is.
  • &Element — uses the element’s bounds field at the call site, with Anchor::Center. For a non-default anchor, call point_for yourself and pass the resulting Point.

Not implemented for crate::Locator: the caller must explicitly resolve the locator to an Element first. This keeps the cost of provider traffic (and the failure mode) visible at the call site.

Required Methods§

Implementations on Foreign Types§

§

impl IntoPoint for (i32, i32)

Implementors§