use_write/
use_write.rs

1
2#[macro_use]
3extern crate clucolor;
4
5use clucolor::colors::Blue;
6use clucolor::colors::BrightBlue;
7use clucolor::cluColor;
8
9fn main() {
10	{//macros write
11
12		let stdout = ::std::io::stdout();
13		let mut lock_stdio = stdout.lock();
14	
15		write_color!(&mut lock_stdio, BrightBlue, "{} {} macro write...", 12345, "str");
16		write_color!(lock_stdio, BrightBlue, "{} {} macro write...", 123465, "str");
17	}
18	
19	{//write struct
20		let writer = Blue::writer();
21	
22		let stdout = ::std::io::stdout();
23		let mut lock_stdio = stdout.lock();
24	
25		writer.writen(&mut lock_stdio, b"TestWriten").unwrap();
26
27	}
28
29	{//macros writen
30
31		writen_color!(&mut ::std::io::stdout(), BrightBlue, "{} {}", 123, "str");
32		//mut 
33
34		writen_color!(::std::io::stdout(), BrightBlue, "{} {}", 12345, "str");
35		//move mut
36	}
37}
38
39