pub enum AssetValue {
Title(Title),
Img(Image),
Video(Video),
Data(Data),
}Variants§
Title(Title)
recommended; object; - Title object for title assets. See TitleObject definition.
Img(Image)
recommended; object; - Image object for image assets. See ImageObject definition.
Video(Video)
optional1; object; - Video object for video assets. See the Video request object definition. Note that in-stream (ie preroll, etc) video ads are not part of Native. Native ads may contain a video as the ad creative itself.
Data(Data)
recommended; object; - Data object for brand name, description, ratings, prices etc. See DataObject definition.
Implementations§
Source§impl AssetValue
impl AssetValue
pub fn is_title(&self) -> bool
pub fn as_title(&self) -> Option<&Title>
pub fn as_title_mut(&mut self) -> Option<&mut Title>
pub fn is_image(&self) -> bool
pub fn as_image(&self) -> Option<&Image>
pub fn as_image_mut(&mut self) -> Option<&mut Image>
pub fn is_video(&self) -> bool
pub fn as_video(&self) -> Option<&Video>
pub fn as_video_mut(&mut self) -> Option<&mut Video>
pub fn is_data(&self) -> bool
pub fn as_data(&self) -> Option<&Data>
pub fn as_data_mut(&mut self) -> Option<&mut Data>
Trait Implementations§
Source§impl Clone for AssetValue
impl Clone for AssetValue
Source§fn clone(&self) -> AssetValue
fn clone(&self) -> AssetValue
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AssetValue
impl Debug for AssetValue
Source§impl<'de> Deserialize<'de> for AssetValue
impl<'de> Deserialize<'de> for AssetValue
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for AssetValue
impl PartialEq for AssetValue
Source§impl Serialize for AssetValue
impl Serialize for AssetValue
impl StructuralPartialEq for AssetValue
Auto Trait Implementations§
impl Freeze for AssetValue
impl RefUnwindSafe for AssetValue
impl Send for AssetValue
impl Sync for AssetValue
impl Unpin for AssetValue
impl UnwindSafe for AssetValue
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