[−][src]Trait verify::ValidateMap
Type returned by validate_map.
Associated Types
Loading content...Required methods
fn with_span(&mut self, span: Option<S>) -> &mut Self
Set the span for the current value that is being validated.
In some cases this is needed to ensure that the validator returns the correct span in its errors.
fn validate_key<V: ?Sized>(&mut self, key: &V) -> Result<(), Self::Error> where
V: Validate<Span = S>,
V: Validate<Span = S>,
Validate a key in the map.
fn validate_string_key<V: ?Sized>(&mut self, key: &V) -> Result<(), Self::Error> where
V: Validate<Span = S> + ToString,
V: Validate<Span = S> + ToString,
Validate a key in the map.
This method guarantees that the key is a string or has a string representation.
fn validate_value<V: ?Sized>(&mut self, value: &V) -> Result<(), Self::Error> where
V: Validate<Span = S>,
V: Validate<Span = S>,
Validate a map entry.
fn end(self) -> Result<(), Self::Error>
End the map.
Provided methods
fn validate_entry<K: ?Sized, V: ?Sized>(
&mut self,
key: &K,
value: &V
) -> Result<(), Self::Error> where
K: Validate<Span = S>,
V: Validate<Span = S>,
&mut self,
key: &K,
value: &V
) -> Result<(), Self::Error> where
K: Validate<Span = S>,
V: Validate<Span = S>,
Validate an entry (key and value).
fn validate_string_entry<K: ?Sized, V: ?Sized>(
&mut self,
key: &K,
value: &V
) -> Result<(), Self::Error> where
K: Validate<Span = S> + ToString,
V: Validate<Span = S>,
&mut self,
key: &K,
value: &V
) -> Result<(), Self::Error> where
K: Validate<Span = S> + ToString,
V: Validate<Span = S>,
Validate an entry (key and value).
This method guarantees that the key is a string or has a string representation.
fn string_key_required(&self) -> bool
Some Validate implementors can convert map keys to strings. With this method redundant conversions can be avoided.