pub struct CodeAddLinesBuilder { /* private fields */ }Expand description
Builder for an animation of adding code lines to the code block.
code.add_lines()
.str(
r"
fn fib(n: u32) -> u32 {
match n {
0 => 0,
1 => 1,
_ => fib(n - 1) + fib(n - 2),
}
}
"
)
.over(5.s())
.style(CodeAnimationStyle::TypeWriter),Implementations§
Source§impl CodeAddLinesBuilder
impl CodeAddLinesBuilder
Sourcepub const fn from_line(self, line: usize) -> Self
pub const fn from_line(self, line: usize) -> Self
Line number that you want to start adding newlines from
Sourcepub const fn over(self, duration: Time) -> Self
pub const fn over(self, duration: Time) -> Self
Duration that you want to be animating adding newlines over
Sourcepub const fn ease(self, ease: Ease) -> Self
pub const fn ease(self, ease: Ease) -> Self
Ease function that you want to use on this animation
Sourcepub const fn style(self, style: CodeAnimationStyle) -> Self
pub const fn style(self, style: CodeAnimationStyle) -> Self
Style of the adding code animation
Trait Implementations§
Source§impl From<CodeAddLinesBuilder> for AnimOP
impl From<CodeAddLinesBuilder> for AnimOP
Source§fn from(b: CodeAddLinesBuilder) -> Self
fn from(b: CodeAddLinesBuilder) -> Self
Converts to this type from the input type.
Source§impl IntoAnimOp for CodeAddLinesBuilder
impl IntoAnimOp for CodeAddLinesBuilder
fn into_anim_op(self) -> AnimOP
Auto Trait Implementations§
impl Freeze for CodeAddLinesBuilder
impl RefUnwindSafe for CodeAddLinesBuilder
impl Send for CodeAddLinesBuilder
impl Sync for CodeAddLinesBuilder
impl Unpin for CodeAddLinesBuilder
impl UnsafeUnpin for CodeAddLinesBuilder
impl UnwindSafe for CodeAddLinesBuilder
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