pub struct AlignmentLines { /* private fields */ }Expand description
Text baselines measured down from a layout’s top edge.
Containers inherit the smallest first baseline and largest last baseline of their placed children. A missing line remains unspecified through translation.
Implementations§
Source§impl AlignmentLines
impl AlignmentLines
Sourcepub fn new(first: Option<f32>, last: Option<f32>) -> AlignmentLines
pub fn new(first: Option<f32>, last: Option<f32>) -> AlignmentLines
Creates alignment lines. Non-finite coordinates are treated as unspecified.
Sourcepub fn first_baseline(self) -> Option<f32>
pub fn first_baseline(self) -> Option<f32>
The first drawn text baseline, when this layout provides one.
Sourcepub fn last_baseline(self) -> Option<f32>
pub fn last_baseline(self) -> Option<f32>
The last drawn text baseline, when this layout provides one.
Sourcepub fn translated(self, y: f32) -> AlignmentLines
pub fn translated(self, y: f32) -> AlignmentLines
Translates specified lines by a child’s vertical placement.
Sourcepub fn merge(&mut self, other: AlignmentLines)
pub fn merge(&mut self, other: AlignmentLines)
Inherits the first and last lines of another placed child.
Sourcepub fn with_overrides(self, explicit: AlignmentLines) -> AlignmentLines
pub fn with_overrides(self, explicit: AlignmentLines) -> AlignmentLines
Replaces inherited lines with the lines explicitly provided by a layout.
Trait Implementations§
Source§impl Clone for AlignmentLines
impl Clone for AlignmentLines
Source§fn clone(&self) -> AlignmentLines
fn clone(&self) -> AlignmentLines
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for AlignmentLines
Source§impl Debug for AlignmentLines
impl Debug for AlignmentLines
Source§impl Default for AlignmentLines
impl Default for AlignmentLines
Source§fn default() -> AlignmentLines
fn default() -> AlignmentLines
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AlignmentLines
impl RefUnwindSafe for AlignmentLines
impl Send for AlignmentLines
impl Sync for AlignmentLines
impl Unpin for AlignmentLines
impl UnsafeUnpin for AlignmentLines
impl UnwindSafe for AlignmentLines
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