pub fn add_precondition_failure_violation(
        &mut self,
        violation_type: impl Into<String>,
        subject: impl Into<String>,
        description: impl Into<String>,
    ) -> &mut Self {
        match &mut self.precondition_failure {
            Some(precondition_failure) => {
                precondition_failure.add_violation(violation_type, subject, description);
            }
            None => {
                self.precondition_failure = Some(PreconditionFailure::with_violation(
                    violation_type,
                    subject,
                    description,
                ));
            }
        };
        self
    }
Adds a [`PreconditionViolation`] to [`PreconditionFailure`] details.
Sets [`PreconditionFailure`] details if it is not set yet. Can be
chained with other `.set_` and `.add_` [`ErrorDetails`] methods.

# Examples

```
use tonic_types::ErrorDetails;

let mut err_details = ErrorDetails::new();

err_details.add_precondition_failure_violation(
"violation type",
"subject",
"description"
);
```
tonic-types/src/richer_error/error_details/mod.rs