Skip to main content

PredefinedConstraintsExt

Trait PredefinedConstraintsExt 

Source
pub trait PredefinedConstraintsExt {
    // Required method
    fn predefined_constraints(&self) -> Result<Option<PredefinedRules>>;
}
Expand description

Extension trait for extracting buf.validate.predefined rules from a field descriptor.

Required Methods§

Source

fn predefined_constraints(&self) -> Result<Option<PredefinedRules>>

Returns the PredefinedRules for this field, if any.

§Errors

Returns an error if the extension value cannot be transcoded to PredefinedRules.

Implementations on Foreign Types§

Source§

impl PredefinedConstraintsExt for FieldDescriptor

Implementors§