pub fn with_bad_request_violation(
        field: impl Into<String>,
        description: impl Into<String>,
    ) -> Self {
        ErrorDetails {
            bad_request: Some(BadRequest::with_violation(field, description)),
            ..ErrorDetails::new()
        }
    }
Generates an [`ErrorDetails`] struct with [`BadRequest`] details (one
[`FieldViolation`] set) and remaining fields set to `None`.

# Examples

```
use tonic_types::ErrorDetails;

let err_details = ErrorDetails::with_bad_request_violation(
"field",
"description",
);
```
tonic-types/src/richer_error/error_details/mod.rs