pub struct Image {
    pub type: Option<ImageAssetType>,
    pub w: Option<i32>,
    pub wmin: Option<i32>,
    pub h: Option<i32>,
    pub hmin: Option<i32>,
    pub mimes: Option<Vec<String>>,
    pub ext: Option<Map<String, Value>>,
}
Expand description

4.4 Image Request Object

The Image object to be used for all image elements of the Native ad such as Icons, Main Image, etc. Recommended sizes and aspect ratios are included in the Image Asset Types section.

Fields§

§type: Option<ImageAssetType>

optional; integer; - Type ID of the image element supported by the publisher. The publisher can display this information in an appropriate format. See Table Image Asset Types.

§w: Option<i32>

optional; integer; - Width of the image in pixels.

§wmin: Option<i32>

recommended; integer; - The minimum requested width of the image in pixels. This option should be used for any rescaling of images by the client. Either w or wmin should be transmitted. If only w is included, it should be considered an exact requirement.

§h: Option<i32>

optional; integer; - Width of the image in pixels.

§hmin: Option<i32>

recommended; integer; - The minimum requested height of the image in pixels. This option should be used for any rescaling of images by the client. Either h or hmin should be transmitted. If only h is included, it should be considered an exact requirement.

§mimes: Option<Vec<String>>

optional; array of string; All types allowed Whitelist of content MIME types supported. Popular MIME types include, but are not limited to “image/jpg” “image/gif”. Each implementing Exchange should have their own list of supported types in the integration docs. See Wikipedia’s MIME page for more information and links to all IETF RFCs. If blank, assume all types are allowed.

§ext: Option<Map<String, Value>>

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§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Deserialize this value from the given Serde deserializer. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.