Enum openrtb2::DistributionChannel
source · Variants§
Site(Site)
object; recommended Details via a Site object (Section 3.2.13) about the publisher’s website. Only applicable and recommended for websites.
App(App)
object; recommended Details via an App object (Section 3.2.14) about the publisher’s app (i.e., non-browser applications). Only applicable and recommended for apps.
Implementations§
source§impl DistributionChannel
impl DistributionChannel
sourcepub fn is_site(&self) -> bool
pub fn is_site(&self) -> bool
Returns true if the DistributionChannel
is a Site. Returns false otherwise.
assert!(DistributionChannel::Site(Default::default()).is_site());
assert!(!DistributionChannel::App(Default::default()).is_site());
sourcepub fn as_site(&self) -> Option<&Site>
pub fn as_site(&self) -> Option<&Site>
If the DistributionChannel
is a Site, returns the associated Site
. Returns None
otherwise.
sourcepub fn as_site_mut(&mut self) -> Option<&mut Site>
pub fn as_site_mut(&mut self) -> Option<&mut Site>
If the DistributionChannel
is a Site, returns the associated mutable Site
. Returns None
otherwise.
sourcepub fn is_app(&self) -> bool
pub fn is_app(&self) -> bool
Returns true if the DistributionChannel
is an App. Returns false otherwise.
assert!(!DistributionChannel::Site(Default::default()).is_app());
assert!(DistributionChannel::App(Default::default()).is_app());
sourcepub fn as_app(&self) -> Option<&App>
pub fn as_app(&self) -> Option<&App>
If the DistributionChannel
is an App, returns the associated App
. Returns None
otherwise.
sourcepub fn as_app_mut(&mut self) -> Option<&mut App>
pub fn as_app_mut(&mut self) -> Option<&mut App>
If the DistributionChannel
is an App, returns the associated mutable App
. Returns None
otherwise.
Trait Implementations§
source§impl Clone for DistributionChannel
impl Clone for DistributionChannel
source§fn clone(&self) -> DistributionChannel
fn clone(&self) -> DistributionChannel
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more