pub struct UsageData {
pub project_cap: Option<String>,
pub project_id: Option<String>,
pub project_usage: Option<String>,
pub cap_reset_day: Option<u64>,
pub daily_project_usage: Option<Value>,
pub daily_client_app_usage: Option<Value>,
pub extra: BTreeMap<String, Value>,
}Expand description
API usage data from the /2/usage/tweets endpoint.
All fields are optional because the shape varies based on query params and the data is deeply nested with mixed types (strings for numbers).
Fields§
§project_cap: Option<String>Project tweet cap (string-encoded integer).
project_id: Option<String>Project identifier.
project_usage: Option<String>Project tweet usage so far this period (string-encoded integer).
cap_reset_day: Option<u64>Day of month the cap resets.
daily_project_usage: Option<Value>Per-day project usage breakdown — opaque JSON.
daily_client_app_usage: Option<Value>Per-day client-app usage breakdown — opaque JSON.
extra: BTreeMap<String, Value>Forward-compatibility bucket — captures unknown usage fields.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for UsageData
impl<'de> Deserialize<'de> for UsageData
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 JsonSchema for UsageData
impl JsonSchema for UsageData
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for UsageData
impl RefUnwindSafe for UsageData
impl Send for UsageData
impl Sync for UsageData
impl Unpin for UsageData
impl UnsafeUnpin for UsageData
impl UnwindSafe for UsageData
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