pub struct WallhavenClient { /* private fields */ }Implementations§
Source§impl WallhavenClient
impl WallhavenClient
pub async fn new(commands: Command) -> Result<Self, Error>
pub async fn execute(&mut self) -> Result<String, WallhavenClientError>
pub async fn request(&self, url: String) -> Result<String, WallhavenClientError>
pub async fn download_image( &self, url: &str, path: &PathBuf, ) -> Result<(), WallhavenClientError>
Sourcepub async fn download_image_with_hash(
&self,
url: &str,
path: &PathBuf,
) -> Result<String, WallhavenClientError>
pub async fn download_image_with_hash( &self, url: &str, path: &PathBuf, ) -> Result<String, WallhavenClientError>
Download image with SHA256 hashing support
Auto Trait Implementations§
impl Freeze for WallhavenClient
impl !RefUnwindSafe for WallhavenClient
impl Send for WallhavenClient
impl Sync for WallhavenClient
impl Unpin for WallhavenClient
impl UnsafeUnpin 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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more