pub struct CloudUsageV1 {
pub schema: String,
pub plan: String,
pub read_only: bool,
pub quotas: BTreeMap<String, CloudQuotaV1>,
pub notices: Option<Value>,
pub model_credit: Option<Value>,
pub suggest_team: Option<bool>,
}Expand description
GET /v1/usage.
Fields§
§schema: String§plan: Stringpersonal, team, enterprise or locked.
read_only: boolThe workspace has no plan: read and export only.
quotas: BTreeMap<String, CloudQuotaV1>By resource name (storage_bytes, transfer_bytes, …).
notices: Option<Value>The cloud’s notices for the Plan page, passed through unread to a
local reader (lean-ctx cloud usage --json).
model_credit: Option<Value>Agent-hour credit and top-up, passed through unread.
suggest_team: Option<bool>The cloud suggests the Team plan, passed through unread.
Implementations§
Source§impl CloudUsageV1
impl CloudUsageV1
Sourcepub fn validate(&self) -> Result<(), ValidationError>
pub fn validate(&self) -> Result<(), ValidationError>
The schema is this one and the quotas stay within bounds.
Sourcepub fn pressing(&self) -> impl Iterator<Item = (&str, &CloudQuotaV1)>
pub fn pressing(&self) -> impl Iterator<Item = (&str, &CloudQuotaV1)>
The quotas at warn or full, by resource name.
Trait Implementations§
Source§impl Clone for CloudUsageV1
impl Clone for CloudUsageV1
Source§impl Debug for CloudUsageV1
impl Debug for CloudUsageV1
Source§impl<'de> Deserialize<'de> for CloudUsageV1
impl<'de> Deserialize<'de> for CloudUsageV1
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
impl Eq for CloudUsageV1
Source§impl PartialEq for CloudUsageV1
impl PartialEq for CloudUsageV1
Source§impl Serialize for CloudUsageV1
impl Serialize for CloudUsageV1
impl StructuralPartialEq for CloudUsageV1
Auto Trait Implementations§
impl Forget for CloudUsageV1
impl Freeze for CloudUsageV1
impl Move for CloudUsageV1
impl RefUnwindSafe for CloudUsageV1
impl Send for CloudUsageV1
impl Sync for CloudUsageV1
impl Unpin for CloudUsageV1
impl UnsafeUnpin for CloudUsageV1
impl UnwindSafe for CloudUsageV1
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