[][src]Trait leetup::service::ServiceProvider

pub trait ServiceProvider<'a> {
    pub fn session(&self) -> Option<&Session>;
pub fn config(&self) -> Result<&Config>;
pub fn fetch_all_problems(&mut self) -> Result<Value>;
pub fn list_problems(&mut self, list: List) -> Result<()>;
pub fn pick_problem(&mut self, pick: Pick) -> Result<()>;
pub fn problem_test(&self, test: Test) -> Result<()>;
pub fn problem_submit(&self, submit: Submit) -> Result<()>;
pub fn process_auth(&mut self, user: User) -> Result<()>;
pub fn cache(&mut self) -> Result<&KvStore>;
pub fn name(&self) -> &'a str; }

ServiceProvider trait provides all the functionalities required to solve problems on any type of Online Judge through leetup CLI.

Required methods

pub fn session(&self) -> Option<&Session>[src]

pub fn config(&self) -> Result<&Config>[src]

pub fn fetch_all_problems(&mut self) -> Result<Value>[src]

pub fn list_problems(&mut self, list: List) -> Result<()>[src]

pub fn pick_problem(&mut self, pick: Pick) -> Result<()>[src]

pub fn problem_test(&self, test: Test) -> Result<()>[src]

pub fn problem_submit(&self, submit: Submit) -> Result<()>[src]

pub fn process_auth(&mut self, user: User) -> Result<()>[src]

pub fn cache(&mut self) -> Result<&KvStore>[src]

pub fn name(&self) -> &'a str[src]

Loading content...

Implementors

impl<'a> ServiceProvider<'a> for Leetcode<'a>[src]

pub fn fetch_all_problems(&mut self) -> Result<Value>[src]

Fetch all problems

Use cache wherever necessary

Loading content...