pub struct UsageLimitExceeded {
pub limit_type: UsageLimitType,
pub current: u64,
pub max: u64,
pub message: Option<String>,
}Expand description
Usage limits exceeded.
Fields§
§limit_type: UsageLimitTypeType of limit exceeded.
current: u64Current value.
max: u64Maximum allowed value.
message: Option<String>Additional message.
Implementations§
Source§impl UsageLimitExceeded
impl UsageLimitExceeded
Sourcepub fn new(limit_type: UsageLimitType, current: u64, max: u64) -> Self
pub fn new(limit_type: UsageLimitType, current: u64, max: u64) -> Self
Create a new usage limit error.
Sourcepub fn with_message(self, message: impl Into<String>) -> Self
pub fn with_message(self, message: impl Into<String>) -> Self
Add a message.
Trait Implementations§
Source§impl Clone for UsageLimitExceeded
impl Clone for UsageLimitExceeded
Source§fn clone(&self) -> UsageLimitExceeded
fn clone(&self) -> UsageLimitExceeded
Returns a duplicate of the value. Read more
1.0.0 · 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 UsageLimitExceeded
impl Debug for UsageLimitExceeded
Source§impl<'de> Deserialize<'de> for UsageLimitExceeded
impl<'de> Deserialize<'de> for UsageLimitExceeded
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 Display for UsageLimitExceeded
impl Display for UsageLimitExceeded
Source§impl Error for UsageLimitExceeded
impl Error for UsageLimitExceeded
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<UsageLimitExceeded> for SerdesAiError
impl From<UsageLimitExceeded> for SerdesAiError
Source§fn from(source: UsageLimitExceeded) -> Self
fn from(source: UsageLimitExceeded) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for UsageLimitExceeded
impl RefUnwindSafe for UsageLimitExceeded
impl Send for UsageLimitExceeded
impl Sync for UsageLimitExceeded
impl Unpin for UsageLimitExceeded
impl UnwindSafe for UsageLimitExceeded
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