Skip to main content

OneofConstraintsExt

Trait OneofConstraintsExt 

Source
pub trait OneofConstraintsExt {
    // Required method
    fn is_required(&self) -> bool;
}
Expand description

Extension trait for extracting buf.validate.oneof rules from a oneof descriptor.

Required Methods§

Source

fn is_required(&self) -> bool

Returns true if this oneof requires exactly one field to be set.

Implementations on Foreign Types§

Source§

impl OneofConstraintsExt for OneofDescriptor

Implementors§