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