pub struct Companion<'a> {Show 20 fields
pub id: Option<Cow<'a, str>>,
pub width: i32,
pub height: i32,
pub asset_width: Option<i32>,
pub asset_height: Option<i32>,
pub expanded_width: Option<i32>,
pub expanded_height: Option<i32>,
pub api_framework: Option<Cow<'a, str>>,
pub ad_slot_id: Option<Cow<'a, str>>,
pub pxratio: Option<f32>,
pub rendering_mode: Option<RenderingMode>,
pub html_resources: Vec<Cow<'a, str>>,
pub iframe_resources: Vec<Cow<'a, str>>,
pub static_resources: Vec<StaticResource<'a>>,
pub ad_parameters: Option<AdParameters<'a>>,
pub alt_text: Option<Cow<'a, str>>,
pub companion_click_through: Option<Cow<'a, str>>,
pub companion_click_trackings: Vec<CompanionClickTracking<'a>>,
pub creative_extensiosn: Option<CreativeExtensions>,
pub tracking_events: Option<TrackingEvents<'a>>,
}Expand description
The resource elements for providing creative resources.
<xs:complexType name="Companion">
<!-- CreativeResource_type -->
<xs:sequence>
<xs:element name="HTMLResource" minOccurs="0" maxOccurs="unbounded" type="vast:HTMLResource_type">
<xs:element name="IFrameResource" minOccurs="0" maxOccurs="unbounded" type="xs:anyURI">
<xs:element name="StaticResource" minOccurs="0" maxOccurs="unbounded">
</xs:sequence>
<xs:attribute name="id" type="xs:string" use="optional">
<xs:attribute name="width" type="xs:integer" use="required">
<xs:attribute name="height" type="xs:integer" use="required">
<xs:attribute name="assetWidth" type="xs:integer" use="optional">
<xs:attribute name="assetHeight" type="xs:integer" use="optional">
<xs:attribute name="expandedWidth" type="xs:integer" use="optional">
<xs:attribute name="expandedHeight" type="xs:integer" use="optional">
<xs:attribute name="apiFramework" type="xs:string" use="optional">
<xs:attribute name="adSlotId" type="xs:string" use="optional">
<xs:attribute name="pxratio" type="xs:decimal">
<xs:attribute name="renderingMode" use="optional">
<xs:sequence>
<xs:element name="AdParameters" minOccurs="0" maxOccurs="1" type="vast:AdParameters_type">
<xs:element name="AltText" minOccurs="0" maxOccurs="1" type="xs:string">
<xs:element name="CompanionClickThrough" minOccurs="0" maxOccurs="1" type="xs:anyURI">
<xs:element name="CompanionClickTracking" minOccurs="0" maxOccurs="unbounded">
<xs:element name="CreativeExtensions" minOccurs="0" maxOccurs="1" type="vast:CreativeExtensions_type" />
<xs:element name="TrackingEvents" minOccurs="0" maxOccurs="1" type="vast:TrackingEvents_type">
</xs:sequence>
</xs:complexType>Fields§
§id: Option<Cow<'a, str>>An optional identifier for the creative.
width: i32An optional identifier for the creative.
height: i32The pixel height of the placement slot for which the creative is intended.
asset_width: Option<i32>The pixel width of the creative.
asset_height: Option<i32>The pixel height of the creative.
expanded_width: Option<i32>The maximum pixel width of the creative in its expanded state.
expanded_height: Option<i32>The maximum pixel height of the creative in its expanded state.
api_framework: Option<Cow<'a, str>>The API necessary to communicate with the creative if available.
ad_slot_id: Option<Cow<'a, str>>Used to identify desired placement on a publisher’s page. Values to be used should be discussed between publishers and advertisers.
pxratio: Option<f32>The pixel ratio for which the companion creative is intended. The pixel ratio is the ratio of physical pixels on the device to the device-independent pixels. An ad intended for display on a device with a pixel ratio that is twice that of a standard 1:1 pixel ratio would use the value “2.” Default value is “1.”
rendering_mode: Option<RenderingMode>Used to indicate when and where to use this companion ad. Values can be “default” or “end-card” or “concurrent”. If this field is empty or not given, “default” will be used.
html_resources: Vec<Cow<'a, str>>The container for zero or more <HTMLResource> elements.
iframe_resources: Vec<Cow<'a, str>>The container for zero or more <IFrameResource> elements.
static_resources: Vec<StaticResource<'a>>The container for zero or more <StaticResource> elements.
ad_parameters: Option<AdParameters<'a>>The container for zero or one <AdParameters> element.
alt_text: Option<Cow<'a, str>>The container for zero or one <AltText> element.
companion_click_through: Option<Cow<'a, str>>The container for zero or one <CompanionClickThrough> element.
companion_click_trackings: Vec<CompanionClickTracking<'a>>The container for zero or more <CompanionClickTracking>
elements.
creative_extensiosn: Option<CreativeExtensions>The container for zero or more <CreativeExtensions> element.
tracking_events: Option<TrackingEvents<'a>>The container for zero or one <TrackingEvents>(TrackingEvents) element.