Struct printr::Printr[][src]

pub struct Printr { /* fields omitted */ }

The main struct that is responsible for generating the output string that will be displayed to the end user.

Implementations

impl Printr[src]

pub fn new(
    interpretations: bool,
    newline: bool,
    plain: bool,
    spaces: bool,
    file: Option<String>,
    color: Option<Color>,
    string: Option<Vec<String>>,
    format: Option<Format>
) -> Self
[src]

Create a new object of this struct.

NOTE: None of the handles are run at this point, so the output string will be unformatted. Refer to run_all_handles.

pub fn determine_sentiment(&mut self)[src]

We perform sentiment analysis.

pub fn handle_spaces(&mut self)[src]

We handle the -s option here.

pub fn handle_interpretations(&mut self)[src]

We handle the -e and -E options here.

pub fn determine_color(&mut self)[src]

We determine the color that should be applied to the output.

pub fn handle_coloring(&mut self)[src]

We handle the -c option here.

pub fn handle_formatting(&mut self)[src]

We handle the -f option here.#

pub fn handle_newline(&mut self)[src]

We handle the -n option here.

pub fn run_all_handles(&mut self)[src]

This runs all the above functions so that all the switches and flags are accounted for.

pub fn get_output_string(self) -> String[src]

This method will return the final string that should be displayed.

Trait Implementations

impl Debug for Printr[src]

impl PartialEq<Printr> for Printr[src]

impl StructuralPartialEq for Printr[src]

Auto Trait Implementations

impl RefUnwindSafe for Printr

impl Send for Printr

impl Sync for Printr

impl Unpin for Printr

impl UnwindSafe for Printr

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.