pub struct TextRestrictions {
pub languages: Option<Vec<String>>,
pub min_length: Option<u32>,
pub max_length: Option<u32>,
pub regex: Option<String>,
}Fields§
§languages: Option<Vec<String>>Optional set of allowed BCP-47 language codes. None = unrestricted.
min_length: Option<u32>§max_length: Option<u32>§regex: Option<String>Trait Implementations§
Source§impl Clone for TextRestrictions
impl Clone for TextRestrictions
Source§fn clone(&self) -> TextRestrictions
fn clone(&self) -> TextRestrictions
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 TextRestrictions
impl Debug for TextRestrictions
Source§impl Default for TextRestrictions
impl Default for TextRestrictions
Source§fn default() -> TextRestrictions
fn default() -> TextRestrictions
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TextRestrictions
impl<'de> Deserialize<'de> for TextRestrictions
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TextRestrictions, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TextRestrictions, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for TextRestrictions
Source§impl FromSchema for TextRestrictions
impl FromSchema for TextRestrictions
fn from_value(value: &SchemaValue) -> Result<TextRestrictions, FromSchemaError>
Source§impl IntoSchema for TextRestrictions
impl IntoSchema for TextRestrictions
fn type_id() -> TypeId
fn register_in(builder: &mut SchemaBuilder) -> SchemaType
fn to_value(&self) -> SchemaValue
Source§impl PartialEq for TextRestrictions
impl PartialEq for TextRestrictions
Source§impl Serialize for TextRestrictions
impl Serialize for TextRestrictions
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for TextRestrictions
Auto Trait Implementations§
impl Freeze for TextRestrictions
impl RefUnwindSafe for TextRestrictions
impl Send for TextRestrictions
impl Sync for TextRestrictions
impl Unpin for TextRestrictions
impl UnsafeUnpin for TextRestrictions
impl UnwindSafe for TextRestrictions
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