pub struct Config { /* private fields */ }
Implementations§
Source§impl Config
impl Config
pub fn load(filename: Option<PathBuf>) -> Result<Self>
pub fn save(&self, filename: Option<PathBuf>) -> Result<()>
pub fn set_calendar_id(&mut self, calendar_id: String)
pub fn set_access_token(&mut self, access_token: Option<String>)
pub fn set_access_token_expires_at(&mut self, expires_at: Option<NaiveDateTime>)
pub fn set_refresh_token(&mut self, refresh_token: Option<String>)
pub fn set_refresh_token_expires_at( &mut self, expires_at: Option<NaiveDateTime>, )
pub fn access_token(&self) -> Option<String>
pub fn access_token_expires_at(&self) -> Option<NaiveDateTime>
pub fn refresh_token(&self) -> Option<String>
pub fn refresh_token_expires_at(&self) -> Option<NaiveDateTime>
pub fn set_redirect_url(&mut self, redirect_url: Option<String>)
pub fn set_default_duration( &mut self, default_duration: Option<FancyDuration<Duration>>, )
pub fn default_duration(&self) -> FancyDuration<Duration>
pub fn calendar_id(&self) -> String
pub fn redirect_url(&self) -> Option<String>
pub fn set_db_type(&mut self, typ: DBType)
pub fn db_type(&self) -> DBType
pub fn use_24h_time(&self) -> bool
pub fn set_use_24h_time(&mut self, use_24h_time: bool)
pub fn query_window(&self) -> Duration
pub fn set_query_window(&mut self, window: Duration)
pub fn set_client_info(&mut self, client_id: String, client_secret: String)
pub fn has_client(&self) -> bool
pub fn client_id(&self) -> Option<String>
pub fn client_secret(&self) -> Option<String>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<Config> for ClientParameters
impl From<Config> for ClientParameters
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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