pub struct ConsumeAgentTaskResponse {
pub allowed: bool,
pub task_count: Option<Option<i32>>,
pub daily_limit: Option<Option<i32>>,
pub trial_ends_at: Option<Option<DateTime<FixedOffset>>>,
pub paid: Option<bool>,
}Expand description
ConsumeAgentTaskResponse : Atomic check+increment. Returns the updated counter on success; returns 402 on trial_expired and 429 on daily_limit_exceeded (the body in error cases is the ApiError envelope).
Fields§
§allowed: bool§task_count: Option<Option<i32>>§daily_limit: Option<Option<i32>>§trial_ends_at: Option<Option<DateTime<FixedOffset>>>§paid: Option<bool>Implementations§
Source§impl ConsumeAgentTaskResponse
impl ConsumeAgentTaskResponse
Sourcepub fn new(allowed: bool) -> ConsumeAgentTaskResponse
pub fn new(allowed: bool) -> ConsumeAgentTaskResponse
Atomic check+increment. Returns the updated counter on success; returns 402 on trial_expired and 429 on daily_limit_exceeded (the body in error cases is the ApiError envelope).
Trait Implementations§
Source§impl Clone for ConsumeAgentTaskResponse
impl Clone for ConsumeAgentTaskResponse
Source§fn clone(&self) -> ConsumeAgentTaskResponse
fn clone(&self) -> ConsumeAgentTaskResponse
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConsumeAgentTaskResponse
impl Debug for ConsumeAgentTaskResponse
Source§impl Default for ConsumeAgentTaskResponse
impl Default for ConsumeAgentTaskResponse
Source§fn default() -> ConsumeAgentTaskResponse
fn default() -> ConsumeAgentTaskResponse
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ConsumeAgentTaskResponse
impl<'de> Deserialize<'de> for ConsumeAgentTaskResponse
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 PartialEq for ConsumeAgentTaskResponse
impl PartialEq for ConsumeAgentTaskResponse
Source§fn eq(&self, other: &ConsumeAgentTaskResponse) -> bool
fn eq(&self, other: &ConsumeAgentTaskResponse) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ConsumeAgentTaskResponse
impl Serialize for ConsumeAgentTaskResponse
impl StructuralPartialEq for ConsumeAgentTaskResponse
Auto Trait Implementations§
impl Freeze for ConsumeAgentTaskResponse
impl RefUnwindSafe for ConsumeAgentTaskResponse
impl Send for ConsumeAgentTaskResponse
impl Sync for ConsumeAgentTaskResponse
impl Unpin for ConsumeAgentTaskResponse
impl UnsafeUnpin for ConsumeAgentTaskResponse
impl UnwindSafe for ConsumeAgentTaskResponse
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