pub struct Search<'a> { /* private fields */ }
Expand description
Represents a search query to the Pexels API.
Implementations§
Source§impl<'a> Search<'a>
impl<'a> Search<'a>
Sourcepub fn builder() -> SearchBuilder<'a>
pub fn builder() -> SearchBuilder<'a>
Creates a new SearchBuilder
for building URI’s.
Sourcepub fn create_uri(&self) -> Result<String, PexelsError>
pub fn create_uri(&self) -> Result<String, PexelsError>
Creates a URI from the search parameters. SearchBuilder
.
Sourcepub async fn fetch(
&self,
client: &Pexels,
) -> Result<PhotosResponse, PexelsError>
pub async fn fetch( &self, client: &Pexels, ) -> Result<PhotosResponse, PexelsError>
Fetches the list of photos from the Pexels API based on the search parameters.
Auto Trait Implementations§
impl<'a> Freeze for Search<'a>
impl<'a> RefUnwindSafe for Search<'a>
impl<'a> Send for Search<'a>
impl<'a> Sync for Search<'a>
impl<'a> Unpin for Search<'a>
impl<'a> UnwindSafe for Search<'a>
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