pub struct Client { /* private fields */ }Implementations§
Source§impl Client
impl Client
pub fn new() -> Result<Self, Error>
Sourcepub async fn problems(
&self,
progress: impl FnMut(usize, Option<u64>),
) -> Result<Vec<Problem>, Error>
pub async fn problems( &self, progress: impl FnMut(usize, Option<u64>), ) -> Result<Vec<Problem>, Error>
Fetch bounded public problem metadata from Codeforces
Sourcepub async fn problem(
&self,
contest_id: u32,
index: &str,
progress: impl FnMut(usize, Option<u64>),
) -> Result<Problem, Error>
pub async fn problem( &self, contest_id: u32, index: &str, progress: impl FnMut(usize, Option<u64>), ) -> Result<Problem, Error>
Resolve one public problem from its canonical contest ID and index
Sourcepub async fn contests(
&self,
progress: impl FnMut(usize, Option<u64>),
) -> Result<Vec<Contest>, Error>
pub async fn contests( &self, progress: impl FnMut(usize, Option<u64>), ) -> Result<Vec<Contest>, Error>
Fetch the next and most recent public non-gym contests
Sourcepub async fn user_profile(
&self,
handle: &str,
progress: impl FnMut(usize, Option<u64>),
) -> Result<UserProfile, Error>
pub async fn user_profile( &self, handle: &str, progress: impl FnMut(usize, Option<u64>), ) -> Result<UserProfile, Error>
Fetch one public Codeforces account profile
Sourcepub async fn rating_history(
&self,
handle: &str,
progress: impl FnMut(usize, Option<u64>),
) -> Result<Vec<RatingChange>, Error>
pub async fn rating_history( &self, handle: &str, progress: impl FnMut(usize, Option<u64>), ) -> Result<Vec<RatingChange>, Error>
Fetch a public Codeforces rating history
Sourcepub async fn submissions(
&self,
handle: &str,
count: u8,
progress: impl FnMut(usize, Option<u64>),
) -> Result<Vec<Submission>, Error>
pub async fn submissions( &self, handle: &str, count: u8, progress: impl FnMut(usize, Option<u64>), ) -> Result<Vec<Submission>, Error>
Fetch up to 100 public submissions, newest first
Sourcepub async fn authenticated_friends(
&self,
credentials: &ApiCredentials,
progress: impl FnMut(usize, Option<u64>),
) -> Result<Vec<Box<str>>, Error>
pub async fn authenticated_friends( &self, credentials: &ApiCredentials, progress: impl FnMut(usize, Option<u64>), ) -> Result<Vec<Box<str>>, Error>
Verify Codeforces API credentials with the authorized user.friends endpoint
Sourcepub async fn recent_discussions(
&self,
progress: impl FnMut(usize, Option<u64>),
) -> Result<Vec<DiscussionPreview>, Error>
pub async fn recent_discussions( &self, progress: impl FnMut(usize, Option<u64>), ) -> Result<Vec<DiscussionPreview>, Error>
Fetch up to 20 public blog entries from Codeforces’ recent activity feed
Sourcepub async fn discussion(
&self,
id: u32,
progress: impl FnMut(usize, Option<u64>),
) -> Result<Discussion, Error>
pub async fn discussion( &self, id: u32, progress: impl FnMut(usize, Option<u64>), ) -> Result<Discussion, Error>
Fetch a public blog entry and its comments
Auto Trait Implementations§
impl !RefUnwindSafe for Client
impl !UnwindSafe for Client
impl Freeze for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnsafeUnpin for Client
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