pub struct WallhavenClient { /* private fields */ }
Implementations§
Source§impl WallhavenClient
impl WallhavenClient
pub fn new(api_key: Option<&str>) -> Result<Self, Error>
pub async fn wallpaper(&self, id: &str) -> Result<Wallpaper, Error>
pub async fn collections( &self, username: Option<&str>, ) -> Result<Vec<UserCollection>, Error>
pub async fn collection_items( &self, username: &str, id: u64, ) -> Result<SearchResult, Error>
pub async fn tag(&self, id: u64) -> Result<Tag, Error>
pub async fn user_settings(&self) -> Result<UserSettings, Error>
Trait Implementations§
Source§impl Clone for WallhavenClient
impl Clone for WallhavenClient
Source§fn clone(&self) -> WallhavenClient
fn clone(&self) -> WallhavenClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for WallhavenClient
impl !RefUnwindSafe for WallhavenClient
impl Send for WallhavenClient
impl Sync for WallhavenClient
impl Unpin for WallhavenClient
impl !UnwindSafe for WallhavenClient
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