Struct taffy::layout::SizeAndBaselines
source · pub struct SizeAndBaselines {
pub size: Size<f32>,
pub first_baselines: Point<Option<f32>>,
}
Expand description
A struct containing both the size of a node and it’s first baseline in each dimension (if it has any)
A baseline is the line on which text sits. Your node likely has a baseline if it is a text node, or contains
children that may be text nodes. See https://www.w3.org/TR/css-writing-modes-3/#intro-baselines for details.
If your node does not have a baseline (or you are unsure how to compute it), then simply return Point::NONE
for the first_baselines field
Fields§
§size: Size<f32>
The size of the node
first_baselines: Point<Option<f32>>
The first baseline of the node in each dimension, if any
Trait Implementations§
source§impl Clone for SizeAndBaselines
impl Clone for SizeAndBaselines
source§fn clone(&self) -> SizeAndBaselines
fn clone(&self) -> SizeAndBaselines
Returns a copy 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 SizeAndBaselines
impl Debug for SizeAndBaselines
impl Copy for SizeAndBaselines
Auto Trait Implementations§
impl RefUnwindSafe for SizeAndBaselines
impl Send for SizeAndBaselines
impl Sync for SizeAndBaselines
impl Unpin for SizeAndBaselines
impl UnwindSafe for SizeAndBaselines
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