pub struct GoogleClient { /* private fields */ }

Implementations§

source§

impl GoogleClient

source

pub fn new(config: Config) -> Result<Self>

source

pub fn client(&self) -> Client

source

pub fn pick_uid(&self) -> u64

source

pub async fn list_calendars( &mut self ) -> Result<Vec<CalendarListItem>, ClientError>

source

pub async fn record_to_event( &mut self, calendar_id: String, record: &mut Record ) -> Event

source

pub async fn refresh_access_token(&mut self) -> Result<()>

source

pub fn event_to_record(&mut self, event: Event) -> Result<Record, ClientError>

Trait Implementations§

source§

impl Clone for GoogleClient

source§

fn clone(&self) -> GoogleClient

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for GoogleClient

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for GoogleClient

source§

fn default() -> GoogleClient

Returns the “default value” for a type. Read more
source§

impl RemoteClient for GoogleClient

source§

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,

source§

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,

source§

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,

source§

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,

source§

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,

source§

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,

source§

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,

source§

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,

source§

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,

source§

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,

source§

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,

source§

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,

source§

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,

source§

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§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more