pub struct FieldOptions {
pub key: Option<String>,
pub required: bool,
pub const_value: Option<String>,
pub pattern: Option<String>,
pub min_length: Option<u64>,
pub min_items: Option<u64>,
pub minimum: Option<i64>,
pub maximum: Option<i64>,
pub heading: Option<String>,
pub level: Option<u64>,
pub non_empty: bool,
}Expand description
The custom options a field may carry.
Fields§
§key: Option<String>The key as written in the document, when the proto field name cannot spell it.
required: boolThe key must be present.
const_value: Option<String>The exact string the value must equal.
pattern: Option<String>The anchored expression the value must match.
min_length: Option<u64>Least length of a string; 1 means “not blank”.
min_items: Option<u64>Least number of items of a repeated field.
minimum: Option<i64>Inclusive lower bound of an integer.
maximum: Option<i64>Inclusive upper bound of an integer.
heading: Option<String>For a body section: the heading text.
level: Option<u64>For a body section: the number of leading hashes.
non_empty: boolFor a body section: it must carry content, not only exist.
Trait Implementations§
Source§impl Clone for FieldOptions
impl Clone for FieldOptions
Source§fn clone(&self) -> FieldOptions
fn clone(&self) -> FieldOptions
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 moreSource§impl Debug for FieldOptions
impl Debug for FieldOptions
Source§impl Default for FieldOptions
impl Default for FieldOptions
Source§fn default() -> FieldOptions
fn default() -> FieldOptions
Returns the “default value” for a type. Read more
impl Eq for FieldOptions
Source§impl PartialEq for FieldOptions
impl PartialEq for FieldOptions
Source§fn eq(&self, other: &FieldOptions) -> bool
fn eq(&self, other: &FieldOptions) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for FieldOptions
Auto Trait Implementations§
impl Freeze for FieldOptions
impl RefUnwindSafe for FieldOptions
impl Send for FieldOptions
impl Sync for FieldOptions
impl Unpin for FieldOptions
impl UnsafeUnpin for FieldOptions
impl UnwindSafe for FieldOptions
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.