pub struct TypewriterPrintStyledContent<D: Display>(pub StyledContent<D>, pub Duration);Expand description
A command that prints styled content, one character at a time.
See StyledContent for more info.
§Examples
use clp::{crossterm, slide, TypewriterPrintStyledContent};
use crossterm::style::Stylize;
use std::time::Duration;
slide!(TypewriterPrintStyledContent(
"Hello, world!".bold(),
Duration::from_millis(25)
))
.expect("each character of \"Hello, world!\" should be printed in 25ms intervals");§Notes
Commands must be executed/queued for execution
(which TypewriterPrintStyledContent is when in slide)
otherwise they do nothing.
Tuple Fields§
§0: StyledContent<D>§1: DurationTrait Implementations§
Source§impl<D: Clone + Display> Clone for TypewriterPrintStyledContent<D>
impl<D: Clone + Display> Clone for TypewriterPrintStyledContent<D>
Source§fn clone(&self) -> TypewriterPrintStyledContent<D>
fn clone(&self) -> TypewriterPrintStyledContent<D>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<D: Display> Command for TypewriterPrintStyledContent<D>
impl<D: Display> Command for TypewriterPrintStyledContent<D>
Source§impl Display for TypewriterPrintStyledContent<&'static str>
impl Display for TypewriterPrintStyledContent<&'static str>
Source§impl Display for TypewriterPrintStyledContent<String>
impl Display for TypewriterPrintStyledContent<String>
impl<D: Copy + Display> Copy for TypewriterPrintStyledContent<D>
Auto Trait Implementations§
impl<D> Freeze for TypewriterPrintStyledContent<D>where
D: Freeze,
impl<D> RefUnwindSafe for TypewriterPrintStyledContent<D>where
D: RefUnwindSafe,
impl<D> Send for TypewriterPrintStyledContent<D>where
D: Send,
impl<D> Sync for TypewriterPrintStyledContent<D>where
D: Sync,
impl<D> Unpin for TypewriterPrintStyledContent<D>where
D: Unpin,
impl<D> UnwindSafe for TypewriterPrintStyledContent<D>where
D: UnwindSafe,
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