pub enum Slide {
Title(String),
Image(&'static str, Option<String>, String),
List(String, Vec<String>),
Code(String, String),
Custom(Custom),
}
Expand description
Represents a single slide.
Available slide types:
- Title: displays a string with big font
- Image: displays an image and a caption string
- List: a list of items with a title
- Code: a code snipped with a title
- Custom: a custom component with user-defined logic
Variants
Title(String)
Image(&'static str, Option<String>, String)
List(String, Vec<String>)
Code(String, String)
Custom(Custom)
Implementations
sourceimpl Slide
impl Slide
sourcepub fn image(resource: &'static str, text: &str) -> Slide
pub fn image(resource: &'static str, text: &str) -> Slide
short-hand function for creating a image slide
sourcepub fn image_with_title(resource: &'static str, title: &str, text: &str) -> Slide
pub fn image_with_title(resource: &'static str, title: &str, text: &str) -> Slide
short-hand function for creating a image slide
sourcepub fn list(title: &str, list: &[&'static str]) -> Slide
pub fn list(title: &str, list: &[&'static str]) -> Slide
short-hand function for creating a list slide
sourcepub fn custom(
title: &str,
init: &'static dyn Fn() -> CustomData,
update: &'static dyn Fn(&mut CustomData, CustomData, &mut Env<'_, Registry, RootModel>) -> bool,
render: &'static dyn Fn(&CustomData) -> Html<Registry, RootModel>
) -> Slide
pub fn custom(
title: &str,
init: &'static dyn Fn() -> CustomData,
update: &'static dyn Fn(&mut CustomData, CustomData, &mut Env<'_, Registry, RootModel>) -> bool,
render: &'static dyn Fn(&CustomData) -> Html<Registry, RootModel>
) -> Slide
short-hand function for creating a list slide
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Slide
impl !Send for Slide
impl !Sync for Slide
impl Unpin for Slide
impl !UnwindSafe for Slide
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more