pub enum ConstraintMode {
Off,
Doc,
}Expand description
Q2.4 — what to emit for OpenAPI constraint keywords
(minimum/maximum/minLength/maxLength/pattern/etc.).
No client-side validation. Constraints belong to the wire contract; the server is the source of truth. The generator surfaces them only as doc-comments so callers see the rules without the SDK duplicating server logic and going brittle when the rules drift.
Variants§
Off
Drop constraints entirely (pre-Q2.4 behavior).
Doc
Emit /// Constraint: ... doc comments on each field.
Cheap, no extra crate dependency. Default.
Trait Implementations§
Source§impl Clone for ConstraintMode
impl Clone for ConstraintMode
Source§fn clone(&self) -> ConstraintMode
fn clone(&self) -> ConstraintMode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ConstraintMode
Source§impl Debug for ConstraintMode
impl Debug for ConstraintMode
Source§impl Default for ConstraintMode
impl Default for ConstraintMode
Source§fn default() -> ConstraintMode
fn default() -> ConstraintMode
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ConstraintMode
impl<'de> Deserialize<'de> for ConstraintMode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ConstraintMode
Source§impl PartialEq for ConstraintMode
impl PartialEq for ConstraintMode
Source§impl Serialize for ConstraintMode
impl Serialize for ConstraintMode
impl StructuralPartialEq for ConstraintMode
Auto Trait Implementations§
impl Freeze for ConstraintMode
impl RefUnwindSafe for ConstraintMode
impl Send for ConstraintMode
impl Sync for ConstraintMode
impl Unpin for ConstraintMode
impl UnsafeUnpin for ConstraintMode
impl UnwindSafe for ConstraintMode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.