pub struct LayoutGuide<T>where
T: Float,{ /* private fields */ }Expand description
Opaque rectangle defined by coordinates within a reference system.
Implementations§
Source§impl<T> LayoutGuide<T>where
T: Float,
impl<T> LayoutGuide<T>where
T: Float,
Sourcepub fn new(
origin: LayoutAnchor<T>,
size: Size<T>,
direction: LayoutDirection,
) -> LayoutGuide<T>
pub fn new( origin: LayoutAnchor<T>, size: Size<T>, direction: LayoutDirection, ) -> LayoutGuide<T>
Returns a new layout guide with the given opaque origin coordinate and the given concrete size and layout direction.
Sourcepub fn top_left(&self) -> LayoutAnchor<T>
pub fn top_left(&self) -> LayoutAnchor<T>
Returns a layout anchor for the top left corner.
Sourcepub fn top_right(&self) -> LayoutAnchor<T>
pub fn top_right(&self) -> LayoutAnchor<T>
Returns a layout anchor for the top right corner.
Sourcepub fn top_leading(&self) -> LayoutAnchor<T>
pub fn top_leading(&self) -> LayoutAnchor<T>
Returns a layout anchor for the top leading corner (which is either the top left corner or the top right corner depending on the layout direction).
Sourcepub fn top_trailing(&self) -> LayoutAnchor<T>
pub fn top_trailing(&self) -> LayoutAnchor<T>
Returns a layout anchor for the top trailing corner (which is either the top right corner or the top left corner depending on the layout direction).
Sourcepub fn bottom_left(&self) -> LayoutAnchor<T>
pub fn bottom_left(&self) -> LayoutAnchor<T>
Returns a layout anchor for the bottom left corner.
Sourcepub fn bottom_right(&self) -> LayoutAnchor<T>
pub fn bottom_right(&self) -> LayoutAnchor<T>
Returns a layout anchor for the bottom right corner.
Sourcepub fn bottom_leading(&self) -> LayoutAnchor<T>
pub fn bottom_leading(&self) -> LayoutAnchor<T>
Returns a layout anchor for the bottom leading corner (which is either the bottom left corner or the bottom right corner depending on the layout direction).
Sourcepub fn bottom_trailing(&self) -> LayoutAnchor<T>
pub fn bottom_trailing(&self) -> LayoutAnchor<T>
Returns a layout anchor for the bottom trailing corner (which is either the bottom right corner or the bottom left corner depending on the layout direction).
Trait Implementations§
Source§impl<T> Clone for LayoutGuide<T>
impl<T> Clone for LayoutGuide<T>
Source§fn clone(&self) -> LayoutGuide<T>
fn clone(&self) -> LayoutGuide<T>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<T> Debug for LayoutGuide<T>
impl<T> Debug for LayoutGuide<T>
Source§impl<T> PartialEq for LayoutGuide<T>
impl<T> PartialEq for LayoutGuide<T>
impl<T> Copy for LayoutGuide<T>
impl<T> Eq for LayoutGuide<T>
impl<T> StructuralPartialEq for LayoutGuide<T>where
T: Float,
Auto Trait Implementations§
impl<T> Freeze for LayoutGuide<T>where
T: Freeze,
impl<T> RefUnwindSafe for LayoutGuide<T>where
T: RefUnwindSafe,
impl<T> Send for LayoutGuide<T>where
T: Send,
impl<T> Sync for LayoutGuide<T>where
T: Sync,
impl<T> Unpin for LayoutGuide<T>where
T: Unpin,
impl<T> UnwindSafe for LayoutGuide<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
Source§fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
Source§fn adapt_into(self) -> D
fn adapt_into(self) -> D
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, U> ConvertInto<U> for Twhere
U: ConvertFrom<T>,
impl<T, U> ConvertInto<U> for Twhere
U: ConvertFrom<T>,
Source§fn convert_into(self) -> U
fn convert_into(self) -> U
Source§fn convert_unclamped_into(self) -> U
fn convert_unclamped_into(self) -> U
Source§fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
OutOfBounds error is returned which contains the unclamped color. Read more