[−][src]Trait verify::serde::Spans
This is supported on
feature="serde"
only.Spans is used to provide spans for values that implement Serde Serialize.
Span hierarchy is controlled by the validators, only the new spans are required.
A Spans instance is cloned for every value in a map or sequence, so custom Clone implementation might be necessary.
Associated Types
type Span: Span
This is supported on
feature="serde"
only.The span type that is associated with each value.
Required methods
fn key<S: ?Sized + Serialize>(&mut self, key: &S) -> Option<Self::Span>
This is supported on
feature="serde"
only.Span for a map key.
fn value<S: ?Sized + Serialize>(&mut self, value: &S) -> Option<Self::Span>
This is supported on
feature="serde"
only.Span for a value.
fn unit(&mut self) -> Option<Self::Span>
This is supported on
feature="serde"
only.Same as value but for unit types.
fn map_start(&mut self) -> Option<Self::Span>
This is supported on
feature="serde"
only.Span for a map value.
fn map_end(&mut self)
This is supported on
feature="serde"
only.Span for errors before closing a map.
This doesn't get called for externally tagged variants.
fn seq_start(&mut self) -> Option<Self::Span>
This is supported on
feature="serde"
only.Span for a sequence value.
fn seq_end(&mut self)
This is supported on
feature="serde"
only.Span for errors before closing a sequence.
This doesn't get called for externally tagged variants.
Implementors
impl Spans for KeySpans
[src]
type Span = Keys
This is supported on
feature="serde"
only.