pub fn with_precondition_failure_violation(
        violation_type: impl Into<String>,
        subject: impl Into<String>,
        description: impl Into<String>,
    ) -> Self {
        ErrorDetails {
            precondition_failure: Some(PreconditionFailure::with_violation(
                violation_type,
                subject,
                description,
            )),
            ..ErrorDetails::new()
        }
    }
Generates an [`ErrorDetails`] struct with [`PreconditionFailure`]
details (one [`PreconditionViolation`] set) and remaining fields set to
`None`.

# Examples

```
use tonic_types::ErrorDetails;

let err_details = ErrorDetails::with_precondition_failure_violation(
"violation type",
"subject",
"description",
);
```
tonic-types/src/richer_error/error_details/mod.rs