pub enum LogicalAlignment {
Start,
End,
Center,
}Expand description
Alignment in logical (direction-aware) terms.
Start and End resolve to physical left/right (or top/bottom) based
on the active FlowDirection.
Variants§
Start
Start edge: left in LTR, right in RTL.
End
End edge: right in LTR, left in RTL.
Center
Center (direction-independent).
Implementations§
Source§impl LogicalAlignment
impl LogicalAlignment
Sourcepub const fn resolve(self, flow: FlowDirection) -> Alignment
pub const fn resolve(self, flow: FlowDirection) -> Alignment
Resolve to a physical Alignment given the flow direction.
For horizontal layouts:
Start→Alignment::Start(LTR) orAlignment::End(RTL)End→Alignment::End(LTR) orAlignment::Start(RTL)Center→Alignment::Center(always)
Trait Implementations§
Source§impl Clone for LogicalAlignment
impl Clone for LogicalAlignment
Source§fn clone(&self) -> LogicalAlignment
fn clone(&self) -> LogicalAlignment
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LogicalAlignment
impl Debug for LogicalAlignment
Source§impl Default for LogicalAlignment
impl Default for LogicalAlignment
Source§fn default() -> LogicalAlignment
fn default() -> LogicalAlignment
Returns the “default value” for a type. Read more
Source§impl PartialEq for LogicalAlignment
impl PartialEq for LogicalAlignment
impl Copy for LogicalAlignment
impl Eq for LogicalAlignment
impl StructuralPartialEq for LogicalAlignment
Auto Trait Implementations§
impl Freeze for LogicalAlignment
impl RefUnwindSafe for LogicalAlignment
impl Send for LogicalAlignment
impl Sync for LogicalAlignment
impl Unpin for LogicalAlignment
impl UnsafeUnpin for LogicalAlignment
impl UnwindSafe for LogicalAlignment
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