[][src]Trait verify::span::Spanned

pub trait Spanned {
    type Span: Span;
    fn span(&self) -> Option<Self::Span>;
}

Spanned values can return an optional Span about themselves.

Associated Types

type Span: Span

Span is information about the value.

It is usually returned with validation errors so that the caller knows where the error happened in case of nested values such as arrays or maps.

Loading content...

Required methods

fn span(&self) -> Option<Self::Span>

Return the span for the value if any.

Span hierarchy for nested values is controlled by the Validators, returning None should reset the hierarchy during validation.

Loading content...

Implementors

impl<'k, S: ?Sized, SP> Spanned for Spanned<'k, S, SP> where
    S: Serialize,
    SP: Spans
[src]

type Span = SP::Span

Loading content...