Skip to main content

Gap

Enum Gap 

Source
pub enum Gap {
    Erased {
        at: String,
        bound: String,
    },
    CustomSerializer {
        at: String,
        with: String,
    },
    UnmappedForeign {
        at: String,
        path: String,
    },
    UnknownRenameRule {
        at: String,
        rule: String,
    },
    StrippedFields {
        at: String,
    },
    TransparentWithoutArgument {
        at: String,
        path: String,
        arg: usize,
    },
    ComplexFieldArgument {
        at: String,
        argument: String,
    },
}
Expand description

A place the extractor could not derive a shape, and why.

Every gap names the exact type or field so the report is actionable, and carries an open schema rather than a guessed one.

Variants§

§

Erased

impl Trait / dyn Trait in return position: only the bound survives.

Fields

§at: String

Where it appeared, e.g. crate::routes::create_item.

§bound: String

The trait bound rustdoc did preserve.

§

CustomSerializer

#[serde(with = "...")] — wire shape defined by code, not by type.

Fields

§with: String

The module or function named by the attribute.

§

UnmappedForeign

A type outside this crate’s rustdoc index with no table mapping.

Fields

§path: String

Canonical path, e.g. chrono::DateTime.

§

UnknownRenameRule

A rename rule this extractor does not implement, from rename_all (serde) or rename_fields/rename_items (async-graphql). Emitting names under an unknown rule would rename every one of them wrongly.

Fields

§rule: String
§

StrippedFields

Rustdoc omits private fields, but serde still serializes them, so the field list is known to be incomplete.

Fields

§

TransparentWithoutArgument

A type mapped transparent in [spec.types], used without the type argument that was supposed to carry its wire shape.

Fields

§path: String

Canonical path of the wrapper, e.g. async_graphql::types::json::Json.

§arg: usize

The zero-based argument position the mapping named.

§

ComplexFieldArgument

A #[graphql(skip)]ed field’s matching #[ComplexObject] resolver takes a required argument this schema has no default for, so the field’s shape could not be recovered.

Fields

§argument: String

The resolver’s own parameter name.

Implementations§

Source§

impl Gap

Source

pub fn at(&self) -> &str

Where the gap was found, for grouping and reporting.

Source

pub fn explain(&self) -> String

One-line explanation naming the cause and the remedy.

Trait Implementations§

Source§

impl Clone for Gap

Source§

fn clone(&self) -> Gap

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 Gap

Source§

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

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

impl Eq for Gap

Source§

impl PartialEq for Gap

Source§

fn eq(&self, other: &Gap) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Gap

Auto Trait Implementations§

§

impl Freeze for Gap

§

impl RefUnwindSafe for Gap

§

impl Send for Gap

§

impl Sync for Gap

§

impl Unpin for Gap

§

impl UnsafeUnpin for Gap

§

impl UnwindSafe for Gap

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<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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<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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.