Enum cacao::layout::LayoutAnchorX
source · [−]pub enum LayoutAnchorX {
Uninitialized,
Leading(ShareId<Object>),
Left(ShareId<Object>),
Trailing(ShareId<Object>),
Right(ShareId<Object>),
Center(ShareId<Object>),
}
Expand description
A wrapper for NSLayoutAnchorX
, used to handle values for how a given view should
layout along the x-axis.
Of note: mismatches of incorrect left/leading and right/trailing anchors are detected at runtime, and will panic - this is by design, as your UI needs to work. Be careful!
Variants
Uninitialized
Represents an uninitialized anchor (e.g, for a view that’s not created yet).
Leading(ShareId<Object>)
Represents a leading anchor; side depends on system orientation.
Left(ShareId<Object>)
Represents a left anchor.
Trailing(ShareId<Object>)
Represents a trailing anchor; side depends on system orientation.
Right(ShareId<Object>)
Represents a right anchor.
Center(ShareId<Object>)
Represents a center anchor on the X axis.
Implementations
sourceimpl LayoutAnchorX
impl LayoutAnchorX
sourcepub fn constraint_equal_to(&self, anchor_to: &LayoutAnchorX) -> LayoutConstraint
pub fn constraint_equal_to(&self, anchor_to: &LayoutAnchorX) -> LayoutConstraint
Return a constraint equal to another horizontal anchor.
sourcepub fn constraint_greater_than_or_equal_to(
&self,
anchor_to: &LayoutAnchorX
) -> LayoutConstraint
pub fn constraint_greater_than_or_equal_to(
&self,
anchor_to: &LayoutAnchorX
) -> LayoutConstraint
Return a constraint greater than or equal to another horizontal anchor.
sourcepub fn constraint_less_than_or_equal_to(
&self,
anchor_to: &LayoutAnchorX
) -> LayoutConstraint
pub fn constraint_less_than_or_equal_to(
&self,
anchor_to: &LayoutAnchorX
) -> LayoutConstraint
Return a constraint less than or equal to another horizontal anchor.
Trait Implementations
sourceimpl Clone for LayoutAnchorX
impl Clone for LayoutAnchorX
sourcefn clone(&self) -> LayoutAnchorX
fn clone(&self) -> LayoutAnchorX
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for LayoutAnchorX
impl Debug for LayoutAnchorX
sourceimpl Default for LayoutAnchorX
impl Default for LayoutAnchorX
Auto Trait Implementations
impl RefUnwindSafe for LayoutAnchorX
impl Send for LayoutAnchorX
impl Sync for LayoutAnchorX
impl Unpin for LayoutAnchorX
impl UnwindSafe for LayoutAnchorX
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more