pub struct Search<'a> { /* private fields */ }Expand description
This endpoint enables you to search Pexels for any topic that you would like. For example, your query could be something broad like Nature, Tigers, People. Or it could be something specific like a Group of people working.
Implementations§
Source§impl<'a> Search<'a>
impl<'a> Search<'a>
Sourcepub fn builder() -> SearchBuilder<'a>
pub fn builder() -> SearchBuilder<'a>
Creates SearchBuilder for building URI’s.
Sourcepub fn create_uri(&self) -> Result<String, PexelsError>
pub fn create_uri(&self) -> Result<String, PexelsError>
Create URI from inputted vales from the 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