Skip to main content

ApiCall

Trait ApiCall 

Source
pub trait ApiCall<'a, R, H: Hub>: ApiCallBase<'a, H, R> + Sized {
    // Provided methods
    fn call(&mut self) -> impl Future<Output = Result<R, ApiCallError>>
       where R: Debug + DeserializeOwned { ... }
    fn call_custom<R2>(
        &mut self,
    ) -> impl Future<Output = Result<R2, ApiCallError>>
       where R2: Debug + DeserializeOwned { ... }
    fn call_download(
        &mut self,
    ) -> impl Future<Output = Result<(), ApiCallError>> { ... }
    fn get_url(&self) -> Result<Url, ApiCallError> { ... }
    fn get_protocol(&self) -> Result<MediaUploadProtocol, ApiCallError> { ... }
    fn get_url_media_upload_simple(
        &self,
        base_url: &str,
    ) -> StdResult<Url, GetUrlError> { ... }
    fn get_url_media_upload_resumable(
        &self,
        base_url: &str,
    ) -> StdResult<Url, GetUrlError> { ... }
    fn get_normal_url(&self, base_url: &str) -> StdResult<Url, GetUrlError> { ... }
    fn get_url_with_path(
        &self,
        base_url: &str,
        path: impl Into<String>,
        upload_type_param: Option<&'static str>,
        download: bool,
    ) -> StdResult<Url, GetUrlError> { ... }
    fn with_hub(&mut self, hub: &'a H) -> &mut Self { ... }
}

Provided Methods§

Source

fn call(&mut self) -> impl Future<Output = Result<R, ApiCallError>>

Source

fn call_custom<R2>(&mut self) -> impl Future<Output = Result<R2, ApiCallError>>
where R2: Debug + DeserializeOwned,

Source

fn call_download(&mut self) -> impl Future<Output = Result<(), ApiCallError>>

Source

fn get_url(&self) -> Result<Url, ApiCallError>

Source

fn get_protocol(&self) -> Result<MediaUploadProtocol, ApiCallError>

Source

fn get_url_media_upload_simple( &self, base_url: &str, ) -> StdResult<Url, GetUrlError>

Source

fn get_url_media_upload_resumable( &self, base_url: &str, ) -> StdResult<Url, GetUrlError>

Source

fn get_normal_url(&self, base_url: &str) -> StdResult<Url, GetUrlError>

Source

fn get_url_with_path( &self, base_url: &str, path: impl Into<String>, upload_type_param: Option<&'static str>, download: bool, ) -> StdResult<Url, GetUrlError>

Source

fn with_hub(&mut self, hub: &'a H) -> &mut Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<'a, T, R: DeserializeOwned + Debug, H: Hub> ApiCall<'a, R, H> for T
where T: ApiCallBase<'a, H, R>,