MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / is_required_field

Function is_required_field

ra-rpc/src/openapi.rs:985–987  ·  view source on GitHub ↗
(field: &FieldDescriptorProto)

Source from the content-addressed store, hash-verified

983}
984
985fn is_required_field(field: &FieldDescriptorProto) -> bool {
986 matches!(field_label(field), FieldLabel::Required)
987}
988
989fn field_label(field: &FieldDescriptorProto) -> FieldLabel {
990 FieldLabel::try_from(field.label.unwrap_or_default()).unwrap_or(FieldLabel::Optional)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected