pub struct AdunitMethods<'a, C>where
C: 'a,{ /* private fields */ }Expand description
A builder providing access to all methods supported on adunit resources.
It is not used directly, but through the AdSense hub.
§Example
Instantiate a resource builder
extern crate hyper;
extern crate hyper_rustls;
extern crate google_adsense1d4 as adsense1d4;
use adsense1d4::{AdSense, FieldMask, hyper_rustls, hyper_util, yup_oauth2};
let secret: yup_oauth2::ApplicationSecret = Default::default();
let connector = hyper_rustls::HttpsConnectorBuilder::new()
.with_native_roots()
.unwrap()
.https_only()
.enable_http2()
.build();
let executor = hyper_util::rt::TokioExecutor::new();
let auth = yup_oauth2::InstalledFlowAuthenticator::with_client(
secret,
yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect,
yup_oauth2::client::CustomHyperClientBuilder::from(
hyper_util::client::legacy::Client::builder(executor).build(connector),
),
).build().await.unwrap();
let client = hyper_util::client::legacy::Client::builder(
hyper_util::rt::TokioExecutor::new()
)
.build(
hyper_rustls::HttpsConnectorBuilder::new()
.with_native_roots()
.unwrap()
.https_or_http()
.enable_http2()
.build()
);
let mut hub = AdSense::new(client, auth);
// Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
// like `customchannels_list(...)`, `get(...)`, `get_ad_code(...)` and `list(...)`
// to build up your call.
let rb = hub.adunits();Implementations§
Source§impl<'a, C> AdunitMethods<'a, C>
impl<'a, C> AdunitMethods<'a, C>
Sourcepub fn customchannels_list(
&self,
ad_client_id: &str,
ad_unit_id: &str,
) -> AdunitCustomchannelListCall<'a, C>
pub fn customchannels_list( &self, ad_client_id: &str, ad_unit_id: &str, ) -> AdunitCustomchannelListCall<'a, C>
Create a builder to help you perform the following task:
List all custom channels which the specified ad unit belongs to.
§Arguments
adClientId- Ad client which contains the ad unit.adUnitId- Ad unit for which to list custom channels.
Sourcepub fn get(&self, ad_client_id: &str, ad_unit_id: &str) -> AdunitGetCall<'a, C>
pub fn get(&self, ad_client_id: &str, ad_unit_id: &str) -> AdunitGetCall<'a, C>
Create a builder to help you perform the following task:
Gets the specified ad unit in the specified ad client.
§Arguments
adClientId- Ad client for which to get the ad unit.adUnitId- Ad unit to retrieve.
Sourcepub fn get_ad_code(
&self,
ad_client_id: &str,
ad_unit_id: &str,
) -> AdunitGetAdCodeCall<'a, C>
pub fn get_ad_code( &self, ad_client_id: &str, ad_unit_id: &str, ) -> AdunitGetAdCodeCall<'a, C>
Create a builder to help you perform the following task:
Get ad code for the specified ad unit.
§Arguments
adClientId- Ad client with contains the ad unit.adUnitId- Ad unit to get the code for.
Sourcepub fn list(&self, ad_client_id: &str) -> AdunitListCall<'a, C>
pub fn list(&self, ad_client_id: &str) -> AdunitListCall<'a, C>
Create a builder to help you perform the following task:
List all ad units in the specified ad client for this AdSense account.
§Arguments
adClientId- Ad client for which to list ad units.
Trait Implementations§
impl<'a, C> MethodsBuilder for AdunitMethods<'a, C>
Auto Trait Implementations§
impl<'a, C> Freeze for AdunitMethods<'a, C>
impl<'a, C> !RefUnwindSafe for AdunitMethods<'a, C>
impl<'a, C> Send for AdunitMethods<'a, C>where
C: Sync,
impl<'a, C> Sync for AdunitMethods<'a, C>where
C: Sync,
impl<'a, C> Unpin for AdunitMethods<'a, C>
impl<'a, C> !UnwindSafe for AdunitMethods<'a, C>
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
Mutably borrows from an owned value. Read more