slowprint
A small library for printing texts slowly which gives scrolling effect to the texts shown.
Install
To install slowprint, please run the following command :
Examples
We can import/use slowprint library functions in either of the three ways:
-
Import all functions of slowprint library crate into our local namespace. Example :
use slowprint::*; -
Import only required functions of slowprint library crate into our local namespace. Example :
use slowprint::slow_println;to useslow_printlnfunction. -
Use fully qualified name to use any method of slowprint library crate. Example:
use slowprint;and then we can call methodprintlnof slowprint crate like thisslowprint::println("Hello, World");.
As per the standards, third way is the preferred way, but other ways make it easier to use methods of crate/library repeatedly.
Some examples are provided below for user's references.
Example 1
Use the default delay time to print slowly.
use print;
print;
print;
print;
Example 2
Use the default delay time to print slowly with newline added at the end.
use println;
println;
println;
println;
Example 3
Pass the delay time to print slowly.
use slow_print;
let delay = from_millis;
slow_print;
slow_print;
slow_print;
Example 4
Pass the delay time to print slowly with newline added at the end.
use slow_println;
let delay = from_millis;
slow_println;
slow_println;
slow_print;