pub enum MediaType {
Photo,
Video,
Empty,
}Expand description
指定要请求的媒体类型。
如果未提供或无效,将返回所有媒体类型。
支持的值:photos、videos。
§示例
use pexels_sdk::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