Struct gcs_example::storage_v1_types::ChannelsService[][src]

pub struct ChannelsService {
    client: TlsClient,
    authenticator: Box<dyn DerefAuth + 'static>,
    scopes: Vec<String>,
    base_url: String,
    root_url: String,
}

The Storage Channels service represents the Channels resource.

Fields

client: TlsClientauthenticator: Box<dyn DerefAuth + 'static>scopes: Vec<String>base_url: Stringroot_url: String

Implementations

impl ChannelsService[src]

pub fn new<A: 'static + DerefAuth>(
    client: TlsClient,
    auth: A
) -> ChannelsService
[src]

Create a new ChannelsService object. The easiest way to call this is wrapping the Authenticator into an Arc: new(client.clone(), Arc::new(authenticator)). This way, one authenticator can be shared among several services.

fn base_url(&self) -> String[src]

Provide the base URL of this API. The returned URL is guaranteed to end with a ‘/’.

fn root_url(&self) -> String[src]

Provide the root URL of this API. The returned URL is guaranteed to end with a ‘/’.

fn format_path(&self, path: &str) -> String[src]

Returns appropriate URLs for relative and absolute paths.

pub fn set_scopes<S: AsRef<str>, T: AsRef<[S]>>(&mut self, scopes: T)[src]

Explicitly select which scopes should be requested for authorization. Otherwise, a possibly too large scope will be requested.

It is most convenient to supply a vec or slice of StorageScopes enum values.

pub async fn stop(
    &self,
    params: &ChannelsStopParams,
    req: &Channel
) -> Result<()>
[src]

Stop watching resources through this channel

Auto Trait Implementations

impl !RefUnwindSafe for ChannelsService

impl Send for ChannelsService

impl Sync for ChannelsService

impl Unpin for ChannelsService

impl !UnwindSafe for ChannelsService

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.