pub struct CarouselItem { /* private fields */ }Expand description
One slide, with a stable unique identifier and a localized accessible name.
Implementations§
Source§impl CarouselItem
impl CarouselItem
Sourcepub fn new(
id: impl Into<SharedString>,
label: impl Into<SharedString>,
content: impl IntoElement,
) -> CarouselItem
pub fn new( id: impl Into<SharedString>, label: impl Into<SharedString>, content: impl IntoElement, ) -> CarouselItem
Creates a carousel item with a stable id, accessible label, and custom element content.
Sourcepub fn image(
id: impl Into<SharedString>,
label: impl Into<SharedString>,
source: impl Into<ImageSource>,
) -> CarouselItem
pub fn image( id: impl Into<SharedString>, label: impl Into<SharedString>, source: impl Into<ImageSource>, ) -> CarouselItem
A full-bleed image cropped to the changing item mask.
Sourcepub fn aspect_ratio(self, width_over_height: f32) -> CarouselItem
pub fn aspect_ratio(self, width_over_height: f32) -> CarouselItem
Width divided by height, used by the multi-aspect ratio layout. Values outside the Material 9:16–16:9 range are clamped.
Sourcepub fn disabled(self, disabled: bool) -> CarouselItem
pub fn disabled(self, disabled: bool) -> CarouselItem
Disables activation and state-layer feedback on this item when true.
Auto Trait Implementations§
impl !RefUnwindSafe for CarouselItem
impl !Send for CarouselItem
impl !Sync for CarouselItem
impl !UnwindSafe for CarouselItem
impl Forget for CarouselItem
impl Freeze for CarouselItem
impl Move for CarouselItem
impl Unpin for CarouselItem
impl UnsafeUnpin for CarouselItem
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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