pub struct CloudClient {
pub endpoint: String,
pub token: Option<TokenStore>,
}Fields§
§endpoint: String§token: Option<TokenStore>Implementations§
Source§impl CloudClient
impl CloudClient
pub fn new(endpoint: impl Into<String>) -> Self
Sourcepub fn from_env() -> Self
pub fn from_env() -> Self
Load from persisted token file (returns unauthenticated client if not logged in).
pub fn is_authenticated(&self) -> bool
pub fn tier(&self) -> Tier
pub fn bearer_token(&self) -> Option<&str>
pub fn gate(&self, required: &Tier, feature: &str) -> Result<()>
Auto Trait Implementations§
impl Freeze for CloudClient
impl RefUnwindSafe for CloudClient
impl Send for CloudClient
impl Sync for CloudClient
impl Unpin for CloudClient
impl UnsafeUnpin for CloudClient
impl UnwindSafe for CloudClient
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