Struct yew_tou_rs::prelude::TourStep
source · pub struct TourStep {
pub selector: String,
pub content: String,
}Expand description
Represents a single step in a tour.
Each TourStep defines a specific element to highlight and the content to display
for that step in the tour.
§Fields
selector- A CSS selector string used to identify the element to highlight.content- The text content to display for this step of the tour.
§Examples
use yew_tou_rs::prelude::TourStep;
let step = TourStep {
selector: ".intro-element".to_string(),
content: "This is the first step of the tour.".to_string(),
};§Serialization
This struct derives Serialize and Deserialize, allowing it to be easily
converted to and from various data formats like JSON.
§Clone and Debug
TourStep can be cloned and printed for debugging purposes.
Fields§
§selector: StringA CSS selector string used to identify the element to highlight for this step.
This should be a valid CSS selector that uniquely identifies the target element on the page. For example, “#intro-button” or “.navbar-item:first-child”.
content: StringThe content to display for this step of the tour.
This can be plain text or formatted text (e.g., Text or Markdown, depending on
your tour implementation). It explains the highlighted element or provides
instructions to the user.
For Markdown the feature markdown must be enabled.
Trait Implementations§
source§impl<'de> Deserialize<'de> for TourStep
impl<'de> Deserialize<'de> for TourStep
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl PartialEq for TourStep
impl PartialEq for TourStep
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)§impl<T> FromQuery for Twhere
T: DeserializeOwned,
impl<T> FromQuery for Twhere
T: DeserializeOwned,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoPropValue<Option<T>> for T
impl<T> IntoPropValue<Option<T>> for T
§fn into_prop_value(self) -> Option<T>
fn into_prop_value(self) -> Option<T>
self to a value of a Properties struct.§impl<T> IntoPropValue<T> for T
impl<T> IntoPropValue<T> for T
§fn into_prop_value(self) -> T
fn into_prop_value(self) -> T
self to a value of a Properties struct.