pub struct TransitionConfig {
pub imgs: Vec<PathBuf>,
pub title: String,
pub n_imgs: f32,
pub duration_per_image: usize,
pub transition_time: f32,
pub shuffle: bool,
pub static_route: String,
}Expand description
Represents the CSS declarations for fade-in/fade-out transitions between images in the slideshow.
Fields§
§imgs: Vec<PathBuf>§title: String§n_imgs: f32§duration_per_image: usize§transition_time: f32§shuffle: bool§static_route: StringThe subroute at which the images will be served, e.g. “static/”
Implementations§
Source§impl TransitionConfig
impl TransitionConfig
Sourcepub fn new(
imgs: Vec<PathBuf>,
title: String,
transition_time: usize,
shuffle: bool,
) -> TransitionConfig
pub fn new( imgs: Vec<PathBuf>, title: String, transition_time: usize, shuffle: bool, ) -> TransitionConfig
From a list of images, generator all the animation values for CSS.
Sourcepub fn generate_html(&self) -> Result<String>
pub fn generate_html(&self) -> Result<String>
Emit full in-line HTML for application. The img-src attributes are the only external resources loaded.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TransitionConfig
impl RefUnwindSafe for TransitionConfig
impl Send for TransitionConfig
impl Sync for TransitionConfig
impl Unpin for TransitionConfig
impl UnwindSafe for TransitionConfig
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