pub struct TourStep {
pub key: String,
pub title: Option<String>,
pub description: Option<Element>,
pub cover: Option<Element>,
pub placement: Option<TooltipPlacement>,
pub target: Option<String>,
pub next_button_text: Option<String>,
pub prev_button_text: Option<String>,
}Expand description
Data model for a single tour step.
Fields§
§key: StringUnique key for the step.
title: Option<String>Title displayed in the tour panel.
description: Option<Element>Description text or element.
cover: Option<Element>Cover image or element displayed above the content.
placement: Option<TooltipPlacement>Placement of the tour panel relative to the target.
target: Option<String>CSS selector for the target element to highlight. When None, the panel is centered on screen.
Custom “Next” button text.
Custom “Previous” button text.
Implementations§
Source§impl TourStep
impl TourStep
Sourcepub fn new(
key: impl Into<String>,
title: impl Into<String>,
description: impl Into<String>,
) -> Self
pub fn new( key: impl Into<String>, title: impl Into<String>, description: impl Into<String>, ) -> Self
Create a new tour step with title and description.
Sourcepub fn placement(self, placement: TooltipPlacement) -> Self
pub fn placement(self, placement: TooltipPlacement) -> Self
Set the placement of the tour panel.
Sourcepub fn description_element(self, desc: Element) -> Self
pub fn description_element(self, desc: Element) -> Self
Set custom description element.
Set custom next button text.
Set custom prev button text.
Trait Implementations§
impl StructuralPartialEq for TourStep
Auto Trait Implementations§
impl !Freeze for TourStep
impl !RefUnwindSafe for TourStep
impl !Send for TourStep
impl !Sync for TourStep
impl Unpin for TourStep
impl !UnwindSafe for TourStep
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
Source§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Create an instance of this type from an initialization function
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<Ret> SpawnIfAsync<(), Ret> for Ret
impl<Ret> SpawnIfAsync<(), Ret> for Ret
Source§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
Source§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
Source§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
Source§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.