pub struct StringSchema {
pub base: BaseSchema,
pub min_length: Option<usize>,
pub max_length: Option<usize>,
pub pattern: Option<Regex>,
}Expand description
A string schema
Fields§
§base: BaseSchema§min_length: Option<usize>§max_length: Option<usize>§pattern: Option<Regex>Implementations§
Source§impl StringSchema
impl StringSchema
pub fn from_base(base: BaseSchema) -> Self
pub fn builder() -> StringSchemaBuilder
Trait Implementations§
Source§impl Debug for StringSchema
impl Debug for StringSchema
Source§impl Default for StringSchema
impl Default for StringSchema
Source§fn default() -> StringSchema
fn default() -> StringSchema
Returns the “default value” for a type. Read more
Source§impl Display for StringSchema
impl Display for StringSchema
Source§impl From<StringSchema> for YamlSchema
impl From<StringSchema> for YamlSchema
Source§fn from(value: StringSchema) -> Self
fn from(value: StringSchema) -> Self
Converts to this type from the input type.
Source§impl PartialEq for StringSchema
impl PartialEq for StringSchema
Source§impl SchemaMetadata for StringSchema
impl SchemaMetadata for StringSchema
fn get_accepted_keys() -> &'static [&'static str]
Source§impl TryFrom<&LinkedHashMap<MarkedYaml<'_>, MarkedYaml<'_>>> for StringSchema
impl TryFrom<&LinkedHashMap<MarkedYaml<'_>, MarkedYaml<'_>>> for StringSchema
Source§fn try_from(mapping: &AnnotatedMapping<'_, MarkedYaml<'_>>) -> Result<Self>
fn try_from(mapping: &AnnotatedMapping<'_, MarkedYaml<'_>>) -> Result<Self>
Performs the conversion.
Source§impl TryFrom<&MarkedYaml<'_>> for StringSchema
impl TryFrom<&MarkedYaml<'_>> for StringSchema
Auto Trait Implementations§
impl Freeze for StringSchema
impl RefUnwindSafe for StringSchema
impl Send for StringSchema
impl Sync for StringSchema
impl Unpin for StringSchema
impl UnwindSafe for StringSchema
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.