pub struct ClickUpConfig {
pub profile: String,
pub token: Option<String>,
pub workspace_id: Option<String>,
pub default_list: Option<String>,
pub timezone: Option<String>,
pub timeout_secs: u64,
pub default_task_limit: Option<usize>,
pub aliases: BTreeMap<String, String>,
pub tokens: BTreeMap<String, String>,
pub base_url: String,
pub cache_dir: PathBuf,
pub config_path: PathBuf,
}Expand description
Effective settings after merging the selected profile with env overrides.
Fields§
§profile: String§token: Option<String>§workspace_id: Option<String>§default_list: Option<String>§timezone: Option<String>§timeout_secs: u64§default_task_limit: Option<usize>§aliases: BTreeMap<String, String>§tokens: BTreeMap<String, String>Per-workspace tokens of the profile; empty when CLICKUP_TOKEN is set.
base_url: String§cache_dir: PathBuf§config_path: PathBufImplementations§
Source§impl ClickUpConfig
impl ClickUpConfig
Sourcepub fn load_profile(profile: Option<&str>) -> Result<Self>
pub fn load_profile(profile: Option<&str>) -> Result<Self>
Load an explicit profile (e.g. --profile work), falling back to the
usual selection when None.
pub fn from_file(file: &ConfigFile, profile: Option<&str>) -> Result<Self>
Sourcepub fn with_token(token: impl Into<String>, base_url: impl Into<String>) -> Self
pub fn with_token(token: impl Into<String>, base_url: impl Into<String>) -> Self
Minimal config for tests and embedding: token + base URL, no file.
pub fn token(&self) -> Result<&str>
pub fn workspace_id(&self) -> Result<&str>
Sourcepub fn set_workspace(&mut self, workspace_id: impl Into<String>)
pub fn set_workspace(&mut self, workspace_id: impl Into<String>)
Switch to workspace_id, and to its own token when the profile has one.
Sourcepub fn all_tokens(&self) -> Vec<String>
pub fn all_tokens(&self) -> Vec<String>
Every distinct token of the profile, the active one first.
Sourcepub fn masked_token(&self) -> Option<String>
pub fn masked_token(&self) -> Option<String>
pk_12…AB style preview that is safe to print.
Trait Implementations§
Source§impl Clone for ClickUpConfig
impl Clone for ClickUpConfig
Auto Trait Implementations§
impl Freeze for ClickUpConfig
impl RefUnwindSafe for ClickUpConfig
impl Send for ClickUpConfig
impl Sync for ClickUpConfig
impl Unpin for ClickUpConfig
impl UnsafeUnpin for ClickUpConfig
impl UnwindSafe for ClickUpConfig
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