pub fn set_precondition_failure(
        &mut self,
        violations: impl Into<Vec<PreconditionViolation>>,
    ) -> &mut Self {
        self.precondition_failure = Some(PreconditionFailure::new(violations));
        self
    }
Set [`PreconditionFailure`] details. Can be chained with other `.set_`
and `.add_` [`ErrorDetails`] methods.

# Examples

```
use tonic_types::{ErrorDetails, PreconditionViolation};

let mut err_details = ErrorDetails::new();

err_details.set_precondition_failure(vec![
PreconditionViolation::new(
"violation type 1",
"subject 1",
"description 1",
),
PreconditionViolation::new(
"violation type 2",
"subject 2",
"description 2",
),
]);
```
tonic-types/src/richer_error/error_details/mod.rs