pub struct Placeable { /* private fields */ }Expand description
Result of running a measurement pass for a single child: its size, node
and alignment lines. A policy places the child with a Placement of
that node in its MeasureResult, where Compose calls
Placeable.place in its layout block.
Implementations§
Source§impl Placeable
impl Placeable
Sourcepub fn value(width: f32, height: f32, node_id: NodeId) -> Placeable
pub fn value(width: f32, height: f32, node_id: NodeId) -> Placeable
A placeable of width by height for the node node_id.
Sourcepub fn value_with_offset(
width: f32,
height: f32,
node_id: NodeId,
content_offset: (f32, f32),
) -> Placeable
pub fn value_with_offset( width: f32, height: f32, node_id: NodeId, content_offset: (f32, f32), ) -> Placeable
Creates a pure-value placeable with a content offset.
Sourcepub fn content_offset(&self) -> (f32, f32)
pub fn content_offset(&self) -> (f32, f32)
Returns the accumulated content offset from the coordinator chain.
Sourcepub fn with_alignment_lines(self, alignment_lines: AlignmentLines) -> Placeable
pub fn with_alignment_lines(self, alignment_lines: AlignmentLines) -> Placeable
Supplies alignment lines relative to this placeable’s top edge.
Sourcepub fn alignment_lines(&self) -> AlignmentLines
pub fn alignment_lines(&self) -> AlignmentLines
Returns the text baselines relative to this placeable’s top edge.
Auto Trait Implementations§
impl Forget for Placeable
impl Freeze for Placeable
impl Move for Placeable
impl RefUnwindSafe for Placeable
impl Send for Placeable
impl Sync for Placeable
impl Unpin for Placeable
impl UnsafeUnpin for Placeable
impl UnwindSafe for Placeable
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
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more