[][src]Struct openrtb_native1::response::Image

pub struct Image<'a> {
    pub type: Option<ImageAssetType>,
    pub url: Cow<'a, str>,
    pub w: Option<i32>,
    pub h: Option<i32>,
    pub ext: Option<Object<'a>>,
}

5.4 Image Response Object

Corresponds to the Image Object in the request. The Image object to be used for all image elements of the Native ad such as Icons, Main Image, etc. It is recommended that if assetsurl/dcourl is being used rather than embedded assets, that an image of each recommended aspect ratio (per the Image Types table) be provided for image type 3.

Fields

type: Option<ImageAssetType>

optional; integer; - Required for assetsurl or dcourl responses, not required for embedded asset responses. The type of image element being submitted from the Image Asset Types table.

url: Cow<'a, str>

required; string; - The text associated with the text element.

w: Option<i32>

recommended; integer; - Width of the image in pixels. Recommended for embedded asset responses. Required for assetsurl/dcourlresponses if multiple assets of same type submitted.

h: Option<i32>

recommended; integer; - Height of the image in pixels. Recommended for embedded asset responses. Required for assetsurl/dcourl responses if multiple assets of same type submitted.

ext: Option<Object<'a>>

optional; object; - This object is a placeholder that may contain custom JSON agreed to by the parties to support flexibility beyond the standard defined in this specification.

Trait Implementations

impl<'a> Clone for Image<'a>[src]

impl<'a> Debug for Image<'a>[src]

impl<'a> Default for Image<'a>[src]

impl<'de: 'a, 'a> Deserialize<'de> for Image<'a>[src]

impl<'a> PartialEq<Image<'a>> for Image<'a>[src]

impl<'a> Serialize for Image<'a>[src]

impl<'a> StructuralPartialEq for Image<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Image<'a>

impl<'a> Send for Image<'a>

impl<'a> Sync for Image<'a>

impl<'a> Unpin for Image<'a>

impl<'a> UnwindSafe for Image<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DefaultExt for T where
    T: Default + PartialEq<T>, 
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.