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]
interpretations: bool,
newline: bool,
plain: bool,
spaces: bool,
file: Option<String>,
color: Option<Color>,
string: Option<Vec<String>>,
format: Option<Format>
) -> Self
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,