#[non_exhaustive]pub struct Violation {
pub type: String,
pub subject: String,
pub description: String,
}Expand description
A message type used to describe a single precondition failure.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.type: StringThe type of PreconditionFailure. We recommend using a service-specific enum type to define the supported precondition violation subjects. For example, “TOS” for “Terms of Service violation”.
subject: StringThe subject, relative to the type, that failed. For example, “google.com/cloud” relative to the “TOS” type would indicate which terms of service is being referenced.
description: StringA description of how the precondition failed. Developers can use this description to understand how to fix the failure.
For example: “Terms of service not accepted”.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Violation
impl<'de> Deserialize<'de> for Violation
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 StructuralPartialEq for Violation
Auto Trait Implementations§
impl Freeze for Violation
impl RefUnwindSafe for Violation
impl Send for Violation
impl Sync for Violation
impl Unpin for Violation
impl UnwindSafe for Violation
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