pub struct ListItem { /* private fields */ }
Implementations§
source§impl ListItem
impl ListItem
pub fn new(id: impl Into<ElementId>, label: Label) -> Self
pub fn on_click( self, handler: impl Fn(&ClickEvent, &mut WindowContext<'_>) + 'static ) -> Self
pub fn variant(self, variant: ListItemVariant) -> Self
pub fn indent_level(self, indent_level: u32) -> Self
pub fn toggle(self, toggle: Toggle) -> Self
pub fn left_content(self, left_content: GraphicSlot) -> Self
pub fn left_icon(self, left_icon: Icon) -> Self
pub fn left_avatar(self, left_avatar: impl Into<SharedString>) -> Self
pub fn size(self, size: ListEntrySize) -> Self
Trait Implementations§
source§impl RenderOnce for ListItem
impl RenderOnce for ListItem
type Element = CompositeElement<ListItem>
fn element_id(&self) -> Option<ElementId>
fn render_once(self) -> Self::Element
fn render_into_any(self) -> AnyElement
fn draw<T, R>( self, origin: Point<Pixels>, available_space: Size<T>, cx: &mut WindowContext<'_>, f: impl FnOnce(&mut <Self::Element as Element>::State, &mut WindowContext<'_>) -> R ) -> Rwhere T: Clone + Default + Debug + Into<AvailableSpace>,
fn map<U>(self, f: impl FnOnce(Self) -> U) -> Uwhere Self: Sized, U: RenderOnce,
fn when(self, condition: bool, then: impl FnOnce(Self) -> Self) -> Selfwhere Self: Sized,
fn when_some<T>( self, option: Option<T>, then: impl FnOnce(Self, T) -> Self ) -> Selfwhere Self: Sized,
Auto Trait Implementations§
impl !RefUnwindSafe for ListItem
impl !Send for ListItem
impl !Sync for ListItem
impl Unpin for ListItem
impl !UnwindSafe for ListItem
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