Skip to main content

PredefinedConstraintsExt

Trait PredefinedConstraintsExt 

Source
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§

Source

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.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl PredefinedConstraintsExt for FieldDescriptor

Implementors§