pub struct GoogleClient { /* private fields */ }
Implementations§
Source§impl GoogleClient
impl GoogleClient
pub fn new(config: Config) -> Result<Self>
pub fn client(&self) -> Client
pub fn pick_uid(&self) -> u64
pub async fn list_calendars( &mut self, ) -> Result<Vec<CalendarListItem>, ClientError>
pub async fn record_to_event( &mut self, calendar_id: String, record: &mut Record, ) -> Event
pub async fn refresh_access_token(&mut self) -> Result<()>
pub fn event_to_record(&mut self, event: Event) -> Result<Record, ClientError>
Trait Implementations§
Source§impl Clone for GoogleClient
impl Clone for GoogleClient
Source§fn clone(&self) -> GoogleClient
fn clone(&self) -> GoogleClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for GoogleClient
impl Debug for GoogleClient
Source§impl Default for GoogleClient
impl Default for GoogleClient
Source§fn default() -> GoogleClient
fn default() -> GoogleClient
Returns the “default value” for a type. Read more
Source§impl RemoteClient for GoogleClient
impl RemoteClient for GoogleClient
fn delete<'life0, 'async_trait>(
&'life0 mut self,
calendar_id: String,
event_id: String,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_recurrence<'life0, 'async_trait>(
&'life0 mut self,
calendar_id: String,
event_id: String,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn record<'life0, 'async_trait>(
&'life0 mut self,
calendar_id: String,
record: Record,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn record_recurrence<'life0, 'async_trait>(
&'life0 mut self,
calendar_id: String,
record: RecurringRecord,
) -> Pin<Box<dyn Future<Output = Result<(String, String)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_recurrence<'life0, 'async_trait>(
&'life0 mut self,
calendar_id: String,
) -> Pin<Box<dyn Future<Output = Result<Vec<RecurringRecord>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn update_recurrence<'life0, 'async_trait>(
&'life0 mut self,
_calendar_id: String,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_today<'life0, 'async_trait>(
&'life0 mut self,
calendar_id: String,
_include_completed: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<Record>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_all<'life0, 'async_trait>(
&'life0 mut self,
calendar_id: String,
_include_completed: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<Record>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn events_now<'life0, 'async_trait>(
&'life0 mut self,
calendar_id: String,
last: Duration,
_include_completed: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<Record>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn complete_task<'life0, 'async_trait>(
&'life0 mut self,
_calendar_id: String,
_primary_key: u64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get<'life0, 'async_trait>(
&'life0 mut self,
calendar_id: String,
event_id: String,
) -> Pin<Box<dyn Future<Output = Result<Record>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_recurring<'life0, 'async_trait>(
&'life0 mut self,
calendar_id: String,
event_id: String,
) -> Pin<Box<dyn Future<Output = Result<RecurringRecord>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn update<'life0, 'async_trait>(
&'life0 mut self,
calendar_id: String,
record: Record,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn update_recurring<'life0, 'async_trait>(
&'life0 mut self,
calendar_id: String,
record: RecurringRecord,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl Freeze for GoogleClient
impl !RefUnwindSafe for GoogleClient
impl Send for GoogleClient
impl Sync for GoogleClient
impl Unpin for GoogleClient
impl !UnwindSafe for GoogleClient
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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