DailyChart

Struct DailyChart 

Source
pub struct DailyChart<'a>(/* private fields */);
Expand description

Representation of chart report about a Day.

Implementations§

Source§

impl<'a> DailyChart<'a>

Source

pub fn new(day: &'a Day) -> Self

Source§

impl<'a> DailyChart<'a>

Source

pub fn project_percentages(&self) -> Percentages

Return a Vec of tuples mapping project name to percentage of the overall time this project took.

Source

pub fn task_percentages(&self, proj: &str) -> Percentages

Return a Vec of tuples mapping the task name and percentage of the supplied project.

Source

pub fn project_pie<W: Write>(&self, w: &mut EventWriter<W>) -> Result<()>

Write a pie chart representing the projects for the current day to the supplied EventWriter.

§Errors

Could return any formatting error

Source

pub fn project_hours<W: Write>(&self, w: &mut EventWriter<W>) -> Result<()>

Write a bar-graph representation of the tasks by hour in the current day to the supplied EventWriter.

§Errors

Could return any formatting error

Source

pub fn task_pie<W: Write>( &self, w: &mut EventWriter<W>, proj: &str, percent: &Percent, ) -> Result<()>

Write a pie chart representing the tasks for the supplied project to the supplied EventWriter.

§Errors

Could return any formatting error

Source

pub fn write<W: Write>(&self, w: &mut EventWriter<W>) -> Result<()>

Write the charts for the current day to the supplied EventWriter.

§Errors

Could return any formatting error

Auto Trait Implementations§

§

impl<'a> Freeze for DailyChart<'a>

§

impl<'a> RefUnwindSafe for DailyChart<'a>

§

impl<'a> Send for DailyChart<'a>

§

impl<'a> Sync for DailyChart<'a>

§

impl<'a> Unpin for DailyChart<'a>

§

impl<'a> UnwindSafe for DailyChart<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.