Struct rainbowcoat::Colors [] [src]

pub struct Colors<W> { /* fields omitted */ }

Colors writable type characters with the ascii rainbow

You can use this any type that requires a io::Write type

examples

Write direcly to stdout

use std::io::{self, Write};
write!(
  &mut rainbowcoat::Colors::new(io::stdout()),
  "hello rainbow"
);

A convenience function makes this common case even easier

use std::io::Write;
write!(
  &mut rainbowcoat::stdout(),
  "hello rainbow"
);

Methods

impl<W> Colors<W>
[src]

Creates a new Colors instance with default spread of 3.0, frequency of 0.1 and seed valud of 0.0

Creates a more configurable instance with provided params

Trait Implementations

impl<W: Write> Write for Colors<W>
[src]

Write a buffer into this object, returning how many bytes were written. Read more

Flush this output stream, ensuring that all intermediately buffered contents reach their destination. Read more

Attempts to write an entire buffer into this write. Read more

Writes a formatted string into this writer, returning any error encountered. Read more

Creates a "by reference" adaptor for this instance of Write. Read more