pub struct Place<T> {
pub target_anchor: Anchor,
pub child_anchor: Anchor,
pub x: T,
pub y: T,
pub width: Sizing<T>,
pub height: Sizing<T>,
pub flip: bool,
pub clamp: bool,
}Expand description
positions with x and y offsets from anchors on the target
Fields§
§target_anchor: Anchor§child_anchor: Anchor§x: T§y: T§width: Sizing<T>§height: Sizing<T>§flip: boolmirrors an axis that overflows the screen
clamp: boolshifts into the screen after flipping
Implementations§
Source§impl<T: Scalar> Place<T>
impl<T: Scalar> Place<T>
Sourcepub fn target_anchor(self, value: Anchor) -> Self
pub fn target_anchor(self, value: Anchor) -> Self
sets Self::target_anchor
Sourcepub fn child_anchor(self, value: Anchor) -> Self
pub fn child_anchor(self, value: Anchor) -> Self
sets Self::child_anchor
Sourcepub fn width(self, value: impl Into<Sizing<T>>) -> Self
pub fn width(self, value: impl Into<Sizing<T>>) -> Self
sets Self::width
Sourcepub fn height(self, value: impl Into<Sizing<T>>) -> Self
pub fn height(self, value: impl Into<Sizing<T>>) -> Self
sets Self::height
Sourcepub fn flip(self, value: bool) -> Self
pub fn flip(self, value: bool) -> Self
sets Self::flip
Sourcepub fn clamp(self, value: bool) -> Self
pub fn clamp(self, value: bool) -> Self
sets Self::clamp
Trait Implementations§
impl<T: Copy> Copy for Place<T>
impl<T: PartialEq> StructuralPartialEq for Place<T>
Auto Trait Implementations§
impl<T> Forget for Place<T>
impl<T> Freeze for Place<T>where
T: Freeze,
impl<T> Move for Place<T>
impl<T> RefUnwindSafe for Place<T>where
T: RefUnwindSafe,
impl<T> Send for Place<T>where
T: Send,
impl<T> Sync for Place<T>where
T: Sync,
impl<T> Unpin for Place<T>where
T: Unpin,
impl<T> UnsafeUnpin for Place<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Place<T>where
T: UnwindSafe,
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