Trait Slidable

Source
pub trait Slidable:
    FromStr
    + Display
    + Clone
    + 'static {
    // Required methods
    fn render<'a>(&self, cx: &'a ScopeState) -> Element<'a>;
    fn next(&self) -> Option<Self>;
    fn prev(&self) -> Option<Self>;
    fn slide_number(&self) -> usize;
    fn number_of_slides(&self) -> usize;
}
Expand description

This trait can be derived using the #[derive(Slidable)] macro.

Required Methods§

Source

fn render<'a>(&self, cx: &'a ScopeState) -> Element<'a>

Source

fn next(&self) -> Option<Self>

Source

fn prev(&self) -> Option<Self>

Source

fn slide_number(&self) -> usize

Source

fn number_of_slides(&self) -> usize

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§