Skip to main content

ValidatedSourceDocument

Struct ValidatedSourceDocument 

Source
pub struct ValidatedSourceDocument { /* private fields */ }
Expand description

A SourceDocument that passed validate.

Implementations§

Source§

impl ValidatedSourceDocument

Source

pub fn document(&self) -> &SourceDocument

The document itself.

Source

pub fn into_document(self) -> SourceDocument

Give the document back, dropping the proof of validation.

Source

pub fn diagnostics(&self) -> Vec<Diagnostic>

Everything the generator has to say before generating: what the normalization to 3.2 lost, and every reference the first release refuses to follow. Ordered by where it occurs in the source.

Methods from Deref<Target = SourceDocument>§

Source

pub fn uri(&self) -> &Url

The document’s identity.

Source

pub fn version(&self) -> SourceVersion

The version the description was written in — not the version spec is at, which is always 3.2.

Source

pub fn fidelity(&self) -> Fidelity

How faithfully the numbers reflect what was written.

Source

pub fn raw(&self) -> &Value

The description exactly as given, before any conversion. Every diagnostic pointer indexes this value.

Source

pub fn spec(&self) -> &Spec

The description normalized to OpenAPI 3.2.

Source

pub fn normalization(&self) -> &[Diagnostic]

What normalizing to 3.2 lost. Recorded by the source-version adapter before the lossy conversion runs, since a 2.0 collectionFormat: tsv that 3.0 drops cannot be recovered afterwards.

Trait Implementations§

Source§

impl Clone for ValidatedSourceDocument

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ValidatedSourceDocument

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Deref for ValidatedSourceDocument

Source§

type Target = SourceDocument

The resulting type after dereferencing.
Source§

fn deref(&self) -> &SourceDocument

Dereferences the value.

Auto Trait Implementations§

§

impl Forget for ValidatedSourceDocument

§

impl Freeze for ValidatedSourceDocument
where *const u8 is !null: Freeze, PhantomData<u8>: Freeze, PhantomData<Value>: Freeze, *const LeafNode<String, Value> is !null: Freeze, PhantomData<(Owned, LeafOrInternal)>: Freeze, PhantomData<Box<(String, Value)>>: Freeze, PhantomData<Server>: Freeze, *const LeafNode<String, PathItem> is !null: Freeze, PhantomData<Box<(String, PathItem)>>: Freeze, *const LeafNode<String, RefOr<Schema, SchemaRef>> is !null: Freeze, PhantomData<Box<(String, RefOr<Schema, SchemaRef>)>>: Freeze, *const LeafNode<String, RefOr<Response>> is !null: Freeze, PhantomData<Box<(String, RefOr<Response>)>>: Freeze, *const LeafNode<String, RefOr<Parameter>> is !null: Freeze, PhantomData<Box<(String, RefOr<Parameter>)>>: Freeze, *const LeafNode<String, RefOr<Example>> is !null: Freeze, PhantomData<Box<(String, RefOr<Example>)>>: Freeze, *const LeafNode<String, RefOr<RequestBody>> is !null: Freeze, PhantomData<Box<(String, RefOr<RequestBody>)>>: Freeze, *const LeafNode<String, RefOr<Header>> is !null: Freeze, PhantomData<Box<(String, RefOr<Header>)>>: Freeze, *const LeafNode<String, RefOr<SecurityScheme>> is !null: Freeze, PhantomData<Box<(String, RefOr<SecurityScheme>)>>: Freeze, *const LeafNode<String, RefOr<Link>> is !null: Freeze, PhantomData<Box<(String, RefOr<Link>)>>: Freeze, *const LeafNode<String, RefOr<Callback>> is !null: Freeze, PhantomData<Box<(String, RefOr<Callback>)>>: Freeze, *const LeafNode<String, RefOr<MediaType>> is !null: Freeze, PhantomData<Box<(String, RefOr<MediaType>)>>: Freeze, PhantomData<BTreeMap<String, Vec<String>>>: Freeze, PhantomData<Tag>: Freeze, PhantomData<Diagnostic>: Freeze,

§

impl Move for ValidatedSourceDocument

§

impl RefUnwindSafe for ValidatedSourceDocument

§

impl Send for ValidatedSourceDocument
where RawVecInner: Send, NodeRef<Owned, String, Value, LeafOrInternal>: Send, BoxRaw<(String, Value)>: Send, NodeRef<Owned, String, ServerVariable, LeafOrInternal>: Send, BoxRaw<(String, ServerVariable)>: Send, NodeRef<Owned, String, PathItem, LeafOrInternal>: Send, BoxRaw<(String, PathItem)>: Send, NodeRef<Owned, String, RefOr<Schema, SchemaRef>, LeafOrInternal>: Send, BoxRaw<(String, RefOr<Schema, SchemaRef>)>: Send, NodeRef<Owned, String, RefOr<Response>, LeafOrInternal>: Send, BoxRaw<(String, RefOr<Response>)>: Send, NodeRef<Owned, String, RefOr<Parameter>, LeafOrInternal>: Send, BoxRaw<(String, RefOr<Parameter>)>: Send, NodeRef<Owned, String, RefOr<Example>, LeafOrInternal>: Send, BoxRaw<(String, RefOr<Example>)>: Send, NodeRef<Owned, String, RefOr<RequestBody>, LeafOrInternal>: Send, BoxRaw<(String, RefOr<RequestBody>)>: Send, NodeRef<Owned, String, RefOr<Header>, LeafOrInternal>: Send, BoxRaw<(String, RefOr<Header>)>: Send, NodeRef<Owned, String, RefOr<SecurityScheme>, LeafOrInternal>: Send, BoxRaw<(String, RefOr<SecurityScheme>)>: Send, NodeRef<Owned, String, RefOr<Link>, LeafOrInternal>: Send, BoxRaw<(String, RefOr<Link>)>: Send, NodeRef<Owned, String, RefOr<Callback>, LeafOrInternal>: Send, BoxRaw<(String, RefOr<Callback>)>: Send, NodeRef<Owned, String, RefOr<MediaType>, LeafOrInternal>: Send, BoxRaw<(String, RefOr<MediaType>)>: Send, NodeRef<Owned, String, Vec<String>, LeafOrInternal>: Send, BoxRaw<(String, Vec<String>)>: Send,

§

impl Sync for ValidatedSourceDocument
where RawVecInner: Sync, NodeRef<Owned, String, Value, LeafOrInternal>: Sync, BoxRaw<(String, Value)>: Sync, NodeRef<Owned, String, ServerVariable, LeafOrInternal>: Sync, BoxRaw<(String, ServerVariable)>: Sync, NodeRef<Owned, String, PathItem, LeafOrInternal>: Sync, BoxRaw<(String, PathItem)>: Sync, NodeRef<Owned, String, RefOr<Schema, SchemaRef>, LeafOrInternal>: Sync, BoxRaw<(String, RefOr<Schema, SchemaRef>)>: Sync, NodeRef<Owned, String, RefOr<Response>, LeafOrInternal>: Sync, BoxRaw<(String, RefOr<Response>)>: Sync, NodeRef<Owned, String, RefOr<Parameter>, LeafOrInternal>: Sync, BoxRaw<(String, RefOr<Parameter>)>: Sync, NodeRef<Owned, String, RefOr<Example>, LeafOrInternal>: Sync, BoxRaw<(String, RefOr<Example>)>: Sync, NodeRef<Owned, String, RefOr<RequestBody>, LeafOrInternal>: Sync, BoxRaw<(String, RefOr<RequestBody>)>: Sync, NodeRef<Owned, String, RefOr<Header>, LeafOrInternal>: Sync, BoxRaw<(String, RefOr<Header>)>: Sync, NodeRef<Owned, String, RefOr<SecurityScheme>, LeafOrInternal>: Sync, BoxRaw<(String, RefOr<SecurityScheme>)>: Sync, NodeRef<Owned, String, RefOr<Link>, LeafOrInternal>: Sync, BoxRaw<(String, RefOr<Link>)>: Sync, NodeRef<Owned, String, RefOr<Callback>, LeafOrInternal>: Sync, BoxRaw<(String, RefOr<Callback>)>: Sync, NodeRef<Owned, String, RefOr<MediaType>, LeafOrInternal>: Sync, BoxRaw<(String, RefOr<MediaType>)>: Sync, NodeRef<Owned, String, Vec<String>, LeafOrInternal>: Sync, BoxRaw<(String, Vec<String>)>: Sync,

§

impl Unpin for ValidatedSourceDocument
where *const u8 is !null: Unpin, *const LeafNode<String, Value> is !null: Unpin, Box<(String, Value)>: Unpin, *const LeafNode<String, ServerVariable> is !null: Unpin, Box<(String, ServerVariable)>: Unpin, *const LeafNode<String, PathItem> is !null: Unpin, Box<(String, PathItem)>: Unpin, *const LeafNode<String, RefOr<Schema, SchemaRef>> is !null: Unpin, Box<(String, RefOr<Schema, SchemaRef>)>: Unpin, *const LeafNode<String, RefOr<Response>> is !null: Unpin, Box<(String, RefOr<Response>)>: Unpin, *const LeafNode<String, RefOr<Parameter>> is !null: Unpin, Box<(String, RefOr<Parameter>)>: Unpin, *const LeafNode<String, RefOr<Example>> is !null: Unpin, Box<(String, RefOr<Example>)>: Unpin, *const LeafNode<String, RefOr<RequestBody>> is !null: Unpin, Box<(String, RefOr<RequestBody>)>: Unpin, *const LeafNode<String, RefOr<Header>> is !null: Unpin, Box<(String, RefOr<Header>)>: Unpin, *const LeafNode<String, RefOr<SecurityScheme>> is !null: Unpin, Box<(String, RefOr<SecurityScheme>)>: Unpin, *const LeafNode<String, RefOr<Link>> is !null: Unpin, Box<(String, RefOr<Link>)>: Unpin, *const LeafNode<String, RefOr<Callback>> is !null: Unpin, Box<(String, RefOr<Callback>)>: Unpin, *const LeafNode<String, RefOr<MediaType>> is !null: Unpin, Box<(String, RefOr<MediaType>)>: Unpin, *const LeafNode<String, Vec<String>> is !null: Unpin, Box<(String, Vec<String>)>: Unpin,

§

impl UnsafeUnpin for ValidatedSourceDocument
where *const u8 is !null: UnsafeUnpin, PhantomData<u8>: UnsafeUnpin, PhantomData<Value>: UnsafeUnpin, *const LeafNode<String, Value> is !null: UnsafeUnpin, PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin, PhantomData<Box<(String, Value)>>: UnsafeUnpin, PhantomData<Server>: UnsafeUnpin, *const LeafNode<String, PathItem> is !null: UnsafeUnpin, PhantomData<Box<(String, PathItem)>>: UnsafeUnpin, *const LeafNode<String, RefOr<Schema, SchemaRef>> is !null: UnsafeUnpin, PhantomData<Box<(String, RefOr<Schema, SchemaRef>)>>: UnsafeUnpin, *const LeafNode<String, RefOr<Response>> is !null: UnsafeUnpin, PhantomData<Box<(String, RefOr<Response>)>>: UnsafeUnpin, *const LeafNode<String, RefOr<Parameter>> is !null: UnsafeUnpin, PhantomData<Box<(String, RefOr<Parameter>)>>: UnsafeUnpin, *const LeafNode<String, RefOr<Example>> is !null: UnsafeUnpin, PhantomData<Box<(String, RefOr<Example>)>>: UnsafeUnpin, *const LeafNode<String, RefOr<RequestBody>> is !null: UnsafeUnpin, PhantomData<Box<(String, RefOr<RequestBody>)>>: UnsafeUnpin, *const LeafNode<String, RefOr<Header>> is !null: UnsafeUnpin, PhantomData<Box<(String, RefOr<Header>)>>: UnsafeUnpin, *const LeafNode<String, RefOr<SecurityScheme>> is !null: UnsafeUnpin, PhantomData<Box<(String, RefOr<SecurityScheme>)>>: UnsafeUnpin, *const LeafNode<String, RefOr<Link>> is !null: UnsafeUnpin, PhantomData<Box<(String, RefOr<Link>)>>: UnsafeUnpin, *const LeafNode<String, RefOr<Callback>> is !null: UnsafeUnpin, PhantomData<Box<(String, RefOr<Callback>)>>: UnsafeUnpin, *const LeafNode<String, RefOr<MediaType>> is !null: UnsafeUnpin, PhantomData<Box<(String, RefOr<MediaType>)>>: UnsafeUnpin, PhantomData<BTreeMap<String, Vec<String>>>: UnsafeUnpin, PhantomData<Tag>: UnsafeUnpin, PhantomData<Diagnostic>: UnsafeUnpin,

§

impl UnwindSafe for ValidatedSourceDocument

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<'a, T> FromIn<'a, T> for T

Source§

fn from_in(t: T, _: &'a Allocator) -> T

Converts to this type from the input type within the given allocator.
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<'a, T, U> IntoIn<'a, U> for T
where U: FromIn<'a, T>,

Source§

fn into_in(self, allocator: &'a Allocator) -> U

Converts this type into the (usually inferred) input type within the given allocator.
Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.