pub struct FrequencyCap {
pub max_impressions: Option<i32>,
pub time_unit: Option<String>,
pub time_unit_count: Option<i32>,
pub unlimited: Option<bool>,
}
Expand description
Settings that control the number of times a user may be shown with the same ad during a given time period.
This type is not used in any activity, and only used as part of another schema.
Fields§
§max_impressions: Option<i32>
The maximum number of times a user may be shown the same ad during this period. Must be greater than 0. Required when unlimited is false
and max_views is not set.
time_unit: Option<String>
The time unit in which the frequency cap will be applied. Required when unlimited is false
.
time_unit_count: Option<i32>
The number of time_unit the frequency cap will last. Required when unlimited is false
. The following restrictions apply based on the value of time_unit: * TIME_UNIT_LIFETIME
- this field is output only and will default to 1 * TIME_UNIT_MONTHS
- must be between 1 and 2 * TIME_UNIT_WEEKS
- must be between 1 and 4 * TIME_UNIT_DAYS
- must be between 1 and 6 * TIME_UNIT_HOURS
- must be between 1 and 23 * TIME_UNIT_MINUTES
- must be between 1 and 59
unlimited: Option<bool>
Whether unlimited frequency capping is applied. When this field is set to true
, the remaining frequency cap fields are not applicable.
Trait Implementations§
Source§impl Clone for FrequencyCap
impl Clone for FrequencyCap
Source§fn clone(&self) -> FrequencyCap
fn clone(&self) -> FrequencyCap
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for FrequencyCap
impl Debug for FrequencyCap
Source§impl Default for FrequencyCap
impl Default for FrequencyCap
Source§fn default() -> FrequencyCap
fn default() -> FrequencyCap
Source§impl<'de> Deserialize<'de> for FrequencyCap
impl<'de> Deserialize<'de> for FrequencyCap
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>,
Source§impl Serialize for FrequencyCap
impl Serialize for FrequencyCap
impl Part for FrequencyCap
Auto Trait Implementations§
impl Freeze for FrequencyCap
impl RefUnwindSafe for FrequencyCap
impl Send for FrequencyCap
impl Sync for FrequencyCap
impl Unpin for FrequencyCap
impl UnwindSafe for FrequencyCap
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more