pub struct SlidesClient { /* private fields */ }Expand description
HTTP client for the Slides v1 REST API.
Implementations§
Source§impl SlidesClient
impl SlidesClient
Sourcepub fn new(base_url: &str, credentials: &DriveCredentials) -> Result<Self>
pub fn new(base_url: &str, credentials: &DriveCredentials) -> Result<Self>
Builds a client against base_url with already-loaded credentials.
Prefer Self::from_drive_client when a DriveClient is already in
hand: this constructor opens a second OAuth session, which means a
second token refresh per invocation.
Sourcepub fn from_drive_client(drive: &DriveClient) -> Result<Self>
pub fn from_drive_client(drive: &DriveClient) -> Result<Self>
Derives a Slides client from a Drive client, sharing its OAuth session and connection pool.
This is the constructor every real caller wants. A slides replace has
to talk to both APIs — Drive for files.get and the ancestor-chain
walk that feeds the write gate, Slides for the text — and two
independent sessions would refresh the same refresh token twice for
one command.
Honours SLIDES_API_URL; the Drive client’s own base URL is irrelevant
here, since the two hosts are unrelated.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for SlidesClient
impl !UnwindSafe for SlidesClient
impl Freeze for SlidesClient
impl Send for SlidesClient
impl Sync for SlidesClient
impl Unpin for SlidesClient
impl UnsafeUnpin for SlidesClient
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> 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