Struct tonic_types::PreconditionViolation
source · pub struct PreconditionViolation {
pub type: String,
pub subject: String,
pub description: String,
}
Expand description
Used at the violations
field of the PreconditionFailure
struct.
Describes a single precondition failure.
Fields§
§type: String
Type of the PreconditionFailure. At error_details.proto, the usage of a service-specific enum type is recommended. For example, “TOS” for a “Terms of Service” violation.
subject: String
Subject, relative to the type, that failed.
description: String
A description of how the precondition failed.
Implementations§
Trait Implementations§
source§impl Clone for PreconditionViolation
impl Clone for PreconditionViolation
source§fn clone(&self) -> PreconditionViolation
fn clone(&self) -> PreconditionViolation
Returns a copy 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 PreconditionViolation
impl Debug for PreconditionViolation
source§impl From<PreconditionViolation> for Violation
impl From<PreconditionViolation> for Violation
source§fn from(value: PreconditionViolation) -> Self
fn from(value: PreconditionViolation) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for PreconditionViolation
impl Send for PreconditionViolation
impl Sync for PreconditionViolation
impl Unpin for PreconditionViolation
impl UnwindSafe for PreconditionViolation
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request