pub struct Context {
pub default_project: Option<String>,
pub default_user: Option<String>,
pub override_api_url: Option<String>,
pub last_version_check: Option<(String, String)>,
pub current: Option<AuthorizedClient>,
pub project_override: Option<String>,
}Fields
default_project: Option<String>stored in the context store file
default_user: Option<String>stored in the context store file
override_api_url: Option<String>api url override
last_version_check: Option<(String, String)>current: Option<AuthorizedClient>runtime context
project_override: Option<String>runtime context
Implementations
sourceimpl Context
impl Context
pub fn find_project_by_id_or_namespace(
&self,
id_or_namespace: String
) -> Option<Project>
pub fn find_project_by_id_or_namespace_error(
&self,
id_or_namespace: String
) -> Project
pub fn current_project(&self) -> Option<Project>
pub fn current_project_error(self) -> Project
pub async fn new() -> Self
pub async fn save(&mut self) -> Result<Self>
pub fn update_command(&self) -> String
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Context
impl<'de> Deserialize<'de> for Context
sourcefn 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
Auto Trait Implementations
impl RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnwindSafe for Context
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more