pub struct RoughlyRight { /* private fields */ }Implementations§
Source§impl RoughlyRight
impl RoughlyRight
pub fn new(username: &str, password: &str) -> Self
pub async fn get(&mut self, url: &str) -> Result<Response, Box<dyn Error>>
pub async fn employees(&mut self) -> Result<Vec<Employee>, Box<dyn Error>>
pub async fn get_monthly_hours( &mut self, from: String, to: String, file: Option<PathBuf>, ) -> Result<MonthlyAnalysis, Box<dyn Error>>
pub async fn get_monthly_hours_xlsx( &mut self, from: String, to: String, ) -> Result<PathBuf, Box<dyn Error>>
pub async fn employees_map( &mut self, ) -> Result<HashMap<String, Employee>, Box<dyn Error>>
pub async fn projects(&mut self) -> Result<Vec<Project>, Box<dyn Error>>
pub async fn projects_map( &mut self, ) -> Result<HashMap<String, Project>, Box<dyn Error>>
pub async fn customers(&mut self) -> Result<Vec<Customer>, Box<dyn Error>>
pub async fn customers_map( &mut self, ) -> Result<HashMap<String, Customer>, Box<dyn Error>>
pub async fn week_hours( &mut self, week_start: &str, week_end: &str, ) -> Result<Vec<WeekData>, Box<dyn Error>>
Sourcepub async fn weekly_work(
&mut self,
week: &str,
ignore: Option<Vec<String>>,
) -> Result<HashMap<String, CompactProject>, Box<dyn Error>>
pub async fn weekly_work( &mut self, week: &str, ignore: Option<Vec<String>>, ) -> Result<HashMap<String, CompactProject>, Box<dyn Error>>
Returns a map of all projects and who works in them on a certain week. Ignores employees with no hours for the specific week. This only returns a subset of the data.
let mut rr = RoughlyRight::new(&username, &password); let weekly_projects: = rr.weekly_work(“202440”).await?;
pub async fn month_missing_income( &mut self, month: &str, ) -> Result<Vec<SimpleEmployee>, Box<dyn Error>>
pub async fn get_user_employment_rate( &mut self, employee_id: &str, ) -> Result<i32, Box<dyn Error>>
pub async fn login(&mut self) -> Result<(), Box<dyn Error>>
Auto Trait Implementations§
impl Freeze for RoughlyRight
impl !RefUnwindSafe for RoughlyRight
impl Send for RoughlyRight
impl Sync for RoughlyRight
impl Unpin for RoughlyRight
impl !UnwindSafe for RoughlyRight
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more