pub enum MediaType {
Photo,
Video,
Empty,
}
Expand description
Specifies the type of media to request.
If not provided or invalid, all media types will be returned.
Supported values: photos
, videos
.
§Example
use pexels_api::MediaType;
use std::str::FromStr;
let media_type = MediaType::from_str("photos");
match media_type {
Ok(mt) => assert_eq!(mt, MediaType::Photo),
Err(e) => eprintln!("Error parsing media type: {:?}", e),
}
Variants§
Trait Implementations§
impl StructuralPartialEq for MediaType
Auto Trait Implementations§
impl Freeze for MediaType
impl RefUnwindSafe for MediaType
impl Send for MediaType
impl Sync for MediaType
impl Unpin for MediaType
impl UnwindSafe for MediaType
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