Struct saturn_cli::config::Config
source · 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 set_sync_duration( &mut self, sync_duration: Option<FancyDuration<Duration>> )
pub fn sync_duration(&self) -> Option<FancyDuration<Duration>>
pub fn use_24h_time(&self) -> bool
pub fn set_use_24h_time(&mut self, use_24h_time: bool)
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 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