pub trait PredefinedConstraintsExt {
// Required method
fn predefined_constraints(&self) -> ConstraintDecodeResult<PredefinedRules>;
}Expand description
Extension trait for extracting buf.validate.predefined rules from a field descriptor.
Required Methods§
Sourcefn predefined_constraints(&self) -> ConstraintDecodeResult<PredefinedRules>
fn predefined_constraints(&self) -> ConstraintDecodeResult<PredefinedRules>
Returns the PredefinedRules for this field, if any.
§Errors
Returns an error if the extension value cannot be transcoded to PredefinedRules.