pub struct LeafRequest<'a> {
pub index: u32,
pub id: &'a str,
pub component: &'a str,
pub part: Option<&'a str>,
pub owner_component: Option<&'a str>,
pub props: &'a Map<String, Value>,
pub text_style: &'a TextStyle,
pub control: ControlBox,
pub lines: Option<u32>,
}Expand description
One leaf the host must measure. index names the layout node; the host
keys its own caches on it. lines = the Text prop (truncate to N lines).
Fields§
§index: u32§id: &'a str§component: &'a strThe native kind (Text, Button, Input, Extension…).
part: Option<&'a str>The synthetic part of a native when the leaf is one (Tabs/tab).
owner_component: Option<&'a str>The component that owns the part (Tabs for Tabs/tab; None for
a plain node): a part’s chrome (an icon, a check) depends on it.
props: &'a Map<String, Value>§text_style: &'a TextStyle§control: ControlBox§lines: Option<u32>Implementations§
Source§impl LeafRequest<'_>
impl LeafRequest<'_>
Sourcepub fn display_text(&self) -> Cow<'_, str>
pub fn display_text(&self) -> Cow<'_, str>
Self::text for a painter: the same prop, and a number or boolean
in it shows as its crate::format::display_string (412, 1.5,
true), the rule the build applies to bound text props. An FFI host
gets this as FfiLeaf.text.
Trait Implementations§
Source§impl<'a> Clone for LeafRequest<'a>
impl<'a> Clone for LeafRequest<'a>
Auto Trait Implementations§
impl<'a> Freeze for LeafRequest<'a>
impl<'a> RefUnwindSafe for LeafRequest<'a>
impl<'a> Send for LeafRequest<'a>
impl<'a> Sync for LeafRequest<'a>
impl<'a> Unpin for LeafRequest<'a>
impl<'a> UnsafeUnpin for LeafRequest<'a>
impl<'a> UnwindSafe for LeafRequest<'a>
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