pub struct Anchor {
pub x: AnchorEdge,
pub y: AnchorEdge,
pub offset: [f32; 2],
}Expand description
The workbench edges a floating panel sticks to, horizontally and vertically, and its distance to each: when the workbench changes size, an anchored edge keeps that distance.
use egui_pop_model::layout::{Anchor, AnchorEdge};
let right = Anchor { x: AnchorEdge::End, ..Anchor::default() };
assert!(!right.is_none());
assert!(Anchor::default().is_none());Fields§
§x: AnchorEdge§y: AnchorEdge§offset: [f32; 2]The distance to the anchored edge on each axis, in points (zero on an axis that is not anchored).
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Anchor
impl<'de> Deserialize<'de> for Anchor
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for Anchor
impl StructuralPartialEq for Anchor
Auto Trait Implementations§
impl Freeze for Anchor
impl RefUnwindSafe for Anchor
impl Send for Anchor
impl Sync for Anchor
impl Unpin for Anchor
impl UnsafeUnpin for Anchor
impl UnwindSafe for Anchor
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