hax_frontend_exporter

Trait JsonSchema

source
pub trait JsonSchema {
    // Required methods
    fn schema_name() -> String;
    fn json_schema(gen: &mut SchemaGenerator) -> Schema;

    // Provided methods
    fn is_referenceable() -> bool { ... }
    fn schema_id() -> Cow<'static, str> { ... }
}
Expand description

A type which can be described as a JSON Schema document.

This is implemented for many Rust primitive and standard library types.

This can also be automatically derived on most custom types with #[derive(JsonSchema)].

§Examples

Deriving an implementation:

use schemars::{schema_for, JsonSchema};

#[derive(JsonSchema)]
struct MyStruct {
    foo: i32,
}

let my_schema = schema_for!(MyStruct);

When manually implementing JsonSchema, as well as determining an appropriate schema, you will need to determine an appropriate name and ID for the type. For non-generic types, the type name/path are suitable for this:

use schemars::{gen::SchemaGenerator, schema::Schema, JsonSchema};
use std::borrow::Cow;

struct NonGenericType;

impl JsonSchema for NonGenericType {
    fn schema_name() -> String {
        // Exclude the module path to make the name in generated schemas clearer.
        "NonGenericType".to_owned()
    }

    fn schema_id() -> Cow<'static, str> {
        // Include the module, in case a type with the same name is in another module/crate
        Cow::Borrowed(concat!(module_path!(), "::NonGenericType"))
    }

    fn json_schema(_gen: &mut SchemaGenerator) -> Schema {
        todo!()
    }
}

assert_eq!(NonGenericType::schema_id(), <&mut NonGenericType>::schema_id());

But generic type parameters which may affect the generated schema should typically be included in the name/ID:

use schemars::{gen::SchemaGenerator, schema::Schema, JsonSchema};
use std::{borrow::Cow, marker::PhantomData};

struct GenericType<T>(PhantomData<T>);

impl<T: JsonSchema> JsonSchema for GenericType<T> {
    fn schema_name() -> String {
        format!("GenericType_{}", T::schema_name())
    }

    fn schema_id() -> Cow<'static, str> {
        Cow::Owned(format!(
            "{}::GenericType<{}>",
            module_path!(),
            T::schema_id()
        ))
    }

    fn json_schema(_gen: &mut SchemaGenerator) -> Schema {
        todo!()
    }
}

assert_eq!(<GenericType<i32>>::schema_id(), <&mut GenericType<&i32>>::schema_id());

Required Methods§

source

fn schema_name() -> String

The name of the generated JSON Schema.

This is used as the title for root schemas, and the key within the root’s definitions property for subschemas.

source

fn json_schema(gen: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type.

If the returned schema depends on any referenceable schemas, then this method will add them to the SchemaGenerator’s schema definitions.

This should not return a $ref schema.

Provided Methods§

source

fn is_referenceable() -> bool

Whether JSON Schemas generated for this type should be re-used where possible using the $ref keyword.

For trivial types (such as primitives), this should return false. For more complex types, it should return true. For recursive types, this must return true to prevent infinite cycles when generating schemas.

By default, this returns true.

source

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type.

This does not have to be a human-readable string, and the value will not itself be included in generated schemas. If two types produce different schemas, then they must have different schema_id()s, but two types that produce identical schemas should ideally have the same schema_id().

The default implementation returns the same value as schema_name().

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

source§

impl JsonSchema for Glob

source§

impl JsonSchema for NamespaceChunk

source§

impl JsonSchema for Value

source§

impl JsonSchema for IpAddr

source§

impl JsonSchema for SocketAddr

source§

impl JsonSchema for bool

source§

impl JsonSchema for char

source§

impl JsonSchema for f32

source§

impl JsonSchema for f64

source§

impl JsonSchema for i8

source§

impl JsonSchema for i16

source§

impl JsonSchema for i32

source§

impl JsonSchema for i64

source§

impl JsonSchema for i128

source§

impl JsonSchema for isize

source§

impl JsonSchema for str

source§

impl JsonSchema for u8

source§

impl JsonSchema for u16

source§

impl JsonSchema for u32

source§

impl JsonSchema for u64

source§

impl JsonSchema for u128

source§

impl JsonSchema for ()

source§

impl JsonSchema for usize

source§

impl JsonSchema for Namespace

source§

impl JsonSchema for Map<String, Value>

source§

impl JsonSchema for Number

source§

impl JsonSchema for CString

source§

impl JsonSchema for String

source§

impl JsonSchema for CStr

source§

impl JsonSchema for Ipv4Addr

source§

impl JsonSchema for Ipv6Addr

source§

impl JsonSchema for SocketAddrV4

source§

impl JsonSchema for SocketAddrV6

source§

impl JsonSchema for NonZero<i8>

source§

impl JsonSchema for NonZero<i16>

source§

impl JsonSchema for NonZero<i32>

source§

impl JsonSchema for NonZero<i64>

source§

impl JsonSchema for NonZero<i128>

source§

impl JsonSchema for NonZero<isize>

source§

impl JsonSchema for NonZero<u8>

source§

impl JsonSchema for NonZero<u16>

source§

impl JsonSchema for NonZero<u32>

source§

impl JsonSchema for NonZero<u64>

source§

impl JsonSchema for NonZero<u128>

source§

impl JsonSchema for NonZero<usize>

source§

impl JsonSchema for AtomicBool

source§

impl JsonSchema for AtomicI8

source§

impl JsonSchema for AtomicI16

source§

impl JsonSchema for AtomicI32

source§

impl JsonSchema for AtomicI64

source§

impl JsonSchema for AtomicIsize

source§

impl JsonSchema for AtomicU8

source§

impl JsonSchema for AtomicU16

source§

impl JsonSchema for AtomicU32

source§

impl JsonSchema for AtomicU64

source§

impl JsonSchema for AtomicUsize

source§

impl JsonSchema for Duration

source§

impl JsonSchema for OsStr

source§

impl JsonSchema for OsString

source§

impl JsonSchema for Path

source§

impl JsonSchema for SystemTime

source§

impl<'a> JsonSchema for Arguments<'a>

source§

impl<'a, T> JsonSchema for Cow<'a, T>
where T: ToOwned + JsonSchema + ?Sized,

source§

impl<'a, T> JsonSchema for &'a T
where T: JsonSchema + ?Sized,

source§

impl<'a, T> JsonSchema for &'a mut T
where T: JsonSchema + ?Sized,

source§

impl<K, V> JsonSchema for BTreeMap<K, V>
where V: JsonSchema,

source§

impl<T0> JsonSchema for (T0,)
where T0: JsonSchema,

source§

impl<T0, T1> JsonSchema for (T0, T1)
where T0: JsonSchema, T1: JsonSchema,

source§

impl<T0, T1, T2> JsonSchema for (T0, T1, T2)
where T0: JsonSchema, T1: JsonSchema, T2: JsonSchema,

source§

impl<T0, T1, T2, T3> JsonSchema for (T0, T1, T2, T3)
where T0: JsonSchema, T1: JsonSchema, T2: JsonSchema, T3: JsonSchema,

source§

impl<T0, T1, T2, T3, T4> JsonSchema for (T0, T1, T2, T3, T4)
where T0: JsonSchema, T1: JsonSchema, T2: JsonSchema, T3: JsonSchema, T4: JsonSchema,

source§

impl<T0, T1, T2, T3, T4, T5> JsonSchema for (T0, T1, T2, T3, T4, T5)
where T0: JsonSchema, T1: JsonSchema, T2: JsonSchema, T3: JsonSchema, T4: JsonSchema, T5: JsonSchema,

source§

impl<T0, T1, T2, T3, T4, T5, T6> JsonSchema for (T0, T1, T2, T3, T4, T5, T6)
where T0: JsonSchema, T1: JsonSchema, T2: JsonSchema, T3: JsonSchema, T4: JsonSchema, T5: JsonSchema, T6: JsonSchema,

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7> JsonSchema for (T0, T1, T2, T3, T4, T5, T6, T7)

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8> JsonSchema for (T0, T1, T2, T3, T4, T5, T6, T7, T8)

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> JsonSchema for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> JsonSchema for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> JsonSchema for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> JsonSchema for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> JsonSchema for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> JsonSchema for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)
where T0: JsonSchema, T1: JsonSchema, T2: JsonSchema, T3: JsonSchema, T4: JsonSchema, T5: JsonSchema, T6: JsonSchema, T7: JsonSchema, T8: JsonSchema, T9: JsonSchema, T10: JsonSchema, T11: JsonSchema, T12: JsonSchema, T13: JsonSchema, T14: JsonSchema,

source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> JsonSchema for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)
where T0: JsonSchema, T1: JsonSchema, T2: JsonSchema, T3: JsonSchema, T4: JsonSchema, T5: JsonSchema, T6: JsonSchema, T7: JsonSchema, T8: JsonSchema, T9: JsonSchema, T10: JsonSchema, T11: JsonSchema, T12: JsonSchema, T13: JsonSchema, T14: JsonSchema, T15: JsonSchema,

source§

impl<T> JsonSchema for Bound<T>
where T: JsonSchema,

source§

impl<T> JsonSchema for Option<T>
where T: JsonSchema,

source§

impl<T> JsonSchema for [T; 0]

source§

impl<T> JsonSchema for [T; 1]
where T: JsonSchema,

source§

impl<T> JsonSchema for [T; 2]
where T: JsonSchema,

source§

impl<T> JsonSchema for [T; 3]
where T: JsonSchema,

source§

impl<T> JsonSchema for [T; 4]
where T: JsonSchema,

source§

impl<T> JsonSchema for [T; 5]
where T: JsonSchema,

source§

impl<T> JsonSchema for [T; 6]
where T: JsonSchema,

source§

impl<T> JsonSchema for [T; 7]
where T: JsonSchema,

source§

impl<T> JsonSchema for [T; 8]
where T: JsonSchema,

source§

impl<T> JsonSchema for [T; 9]
where T: JsonSchema,

source§

impl<T> JsonSchema for [T; 10]
where T: JsonSchema,

source§

impl<T> JsonSchema for [T; 11]
where T: JsonSchema,

source§

impl<T> JsonSchema for [T; 12]
where T: JsonSchema,

source§

impl<T> JsonSchema for [T; 13]
where T: JsonSchema,

source§

impl<T> JsonSchema for [T; 14]
where T: JsonSchema,

source§

impl<T> JsonSchema for [T; 15]
where T: JsonSchema,

source§

impl<T> JsonSchema for [T; 16]
where T: JsonSchema,

source§

impl<T> JsonSchema for [T; 17]
where T: JsonSchema,

source§

impl<T> JsonSchema for [T; 18]
where T: JsonSchema,

source§

impl<T> JsonSchema for [T; 19]
where T: JsonSchema,

source§

impl<T> JsonSchema for [T; 20]
where T: JsonSchema,

source§

impl<T> JsonSchema for [T; 21]
where T: JsonSchema,

source§

impl<T> JsonSchema for [T; 22]
where T: JsonSchema,

source§

impl<T> JsonSchema for [T; 23]
where T: JsonSchema,

source§

impl<T> JsonSchema for [T; 24]
where T: JsonSchema,

source§

impl<T> JsonSchema for [T; 25]
where T: JsonSchema,

source§

impl<T> JsonSchema for [T; 26]
where T: JsonSchema,

source§

impl<T> JsonSchema for [T; 27]
where T: JsonSchema,

source§

impl<T> JsonSchema for [T; 28]
where T: JsonSchema,

source§

impl<T> JsonSchema for [T; 29]
where T: JsonSchema,

source§

impl<T> JsonSchema for [T; 30]
where T: JsonSchema,

source§

impl<T> JsonSchema for [T; 31]
where T: JsonSchema,

source§

impl<T> JsonSchema for [T; 32]
where T: JsonSchema,

source§

impl<T> JsonSchema for [T]
where T: JsonSchema,

source§

impl<T> JsonSchema for Box<T>
where T: JsonSchema + ?Sized,

source§

impl<T> JsonSchema for BinaryHeap<T>
where T: JsonSchema,

source§

impl<T> JsonSchema for BTreeSet<T>
where T: JsonSchema,

source§

impl<T> JsonSchema for LinkedList<T>
where T: JsonSchema,

source§

impl<T> JsonSchema for VecDeque<T>
where T: JsonSchema,

source§

impl<T> JsonSchema for Weak<T>
where T: JsonSchema + ?Sized,

source§

impl<T> JsonSchema for Arc<T>
where T: JsonSchema + ?Sized,

source§

impl<T> JsonSchema for Weak<T>
where T: JsonSchema + ?Sized,

source§

impl<T> JsonSchema for Vec<T>
where T: JsonSchema,

source§

impl<T> JsonSchema for Cell<T>
where T: JsonSchema + ?Sized,

source§

impl<T> JsonSchema for RefCell<T>
where T: JsonSchema + ?Sized,

source§

impl<T> JsonSchema for Reverse<T>
where T: JsonSchema,

source§

impl<T> JsonSchema for PhantomData<T>
where T: ?Sized,

source§

impl<T> JsonSchema for Wrapping<T>
where T: JsonSchema,

source§

impl<T> JsonSchema for Range<T>
where T: JsonSchema,

source§

impl<T> JsonSchema for RangeInclusive<T>
where T: JsonSchema,

source§

impl<T> JsonSchema for Mutex<T>
where T: JsonSchema + ?Sized,

source§

impl<T> JsonSchema for RwLock<T>
where T: JsonSchema + ?Sized,

source§

impl<T, E> JsonSchema for Result<T, E>
where T: JsonSchema, E: JsonSchema,

source§

impl<T, H> JsonSchema for HashSet<T, H>
where T: JsonSchema,

Implementors§

source§

impl JsonSchema for ConstantExprKind

source§

impl JsonSchema for ConstantInt

source§

impl JsonSchema for ConstantLiteral

source§

impl JsonSchema for Foo

source§

impl JsonSchema for ImplExprAtom

source§

impl JsonSchema for ImplExprPathChunk

source§

impl JsonSchema for CtorKind

source§

impl JsonSchema for CtorOf

source§

impl JsonSchema for DefKind

source§

impl JsonSchema for DefPathItem

source§

impl JsonSchema for MacroKind

source§

impl JsonSchema for Safety

source§

impl JsonSchema for Abi

source§

impl JsonSchema for AssocItemKind

source§

impl JsonSchema for AttrArgs

source§

impl JsonSchema for AttrArgsEq

source§

impl JsonSchema for AttrKind

source§

impl JsonSchema for AttrStyle

source§

impl JsonSchema for ByRef

source§

impl JsonSchema for CommentKind

source§

impl JsonSchema for Constness

source§

impl JsonSchema for Defaultness

source§

impl JsonSchema for DelimSpan

source§

impl JsonSchema for Delimiter

source§

impl JsonSchema for FnRetTy

source§

impl JsonSchema for HirGenericArgs

source§

impl JsonSchema for ImplPolarity

source§

impl JsonSchema for ImplicitSelfKind

source§

impl JsonSchema for InlineAsm

source§

impl JsonSchema for InlineAttr

source§

impl JsonSchema for IsAsync

source§

impl JsonSchema for IsAuto

source§

impl JsonSchema for LifetimeParamKind

source§

impl JsonSchema for LitFloatType

source§

impl JsonSchema for LitKind

source§

impl JsonSchema for MissingLifetimeKind

source§

impl JsonSchema for Movability

source§

impl JsonSchema for NonMacroAttrKind

source§

impl JsonSchema for OpaqueTyOrigin

source§

impl JsonSchema for OwnerId

source§

impl JsonSchema for ParamName

source§

impl JsonSchema for PrimTy

source§

impl JsonSchema for QPath

source§

impl JsonSchema for RangeEnd

source§

impl JsonSchema for Res

source§

impl JsonSchema for StrStyle

source§

impl JsonSchema for UseKind

source§

impl JsonSchema for VariantData

source§

impl JsonSchema for WhereEqPredicate

source§

impl JsonSchema for WhereRegionPredicate

source§

impl JsonSchema for AggregateKind

source§

impl JsonSchema for AnalysisPhase

source§

impl JsonSchema for AssertMessage

source§

impl JsonSchema for BasicBlock

source§

impl JsonSchema for BinOp

source§

impl JsonSchema for BorrowKind

source§

impl JsonSchema for CallSource

source§

impl JsonSchema for CastKind

source§

impl JsonSchema for CoercionSource

source§

impl JsonSchema for ConstAllocation

source§

impl JsonSchema for CoroutineInfo

source§

impl JsonSchema for CoverageKind

source§

impl JsonSchema for FakeBorrowKind

source§

impl JsonSchema for FakeReadCause

source§

impl JsonSchema for FieldIdx

source§

impl JsonSchema for FunOperand

source§

impl JsonSchema for InlineAsmOperand

source§

impl JsonSchema for InlineAsmOptions

source§

impl JsonSchema for InlineAsmTemplatePiece

source§

impl JsonSchema for InstanceKind

source§

impl JsonSchema for IntUintTy

source§

impl JsonSchema for Local

source§

impl JsonSchema for LocalInfo

source§

impl JsonSchema for MirPhase

source§

impl JsonSchema for MirSource

source§

impl JsonSchema for MutBorrowKind

source§

impl JsonSchema for NonDivergingIntrinsic

source§

impl JsonSchema for NullOp

source§

impl JsonSchema for Operand

source§

impl JsonSchema for PlaceKind

source§

impl JsonSchema for ProjectionElem

source§

impl JsonSchema for ProjectionElemFieldKind

source§

impl JsonSchema for RetagKind

source§

impl JsonSchema for RuntimePhase

source§

impl JsonSchema for Rvalue

source§

impl JsonSchema for ScopeData

source§

impl JsonSchema for SourceScope

source§

impl JsonSchema for StatementKind

source§

impl JsonSchema for SwitchTargets

source§

impl JsonSchema for TerminatorKind

source§

impl JsonSchema for UnOp

source§

impl JsonSchema for UnwindAction

source§

impl JsonSchema for UnwindTerminateReason

source§

impl JsonSchema for UserTypeAnnotationIndex

source§

impl JsonSchema for UserTypeProjection

source§

impl JsonSchema for UserTypeProjections

source§

impl JsonSchema for VarDebugInfo

source§

impl JsonSchema for VariantKind

source§

impl JsonSchema for AstPass

source§

impl JsonSchema for DesugaringKind

source§

impl JsonSchema for Edition

source§

impl JsonSchema for ErrorGuaranteed

source§

impl JsonSchema for ExpnKind

source§

impl JsonSchema for FileName

source§

impl JsonSchema for RealFileName

source§

impl JsonSchema for BlockSafety

source§

impl JsonSchema for ExprKind

source§

impl JsonSchema for LintLevel

source§

impl JsonSchema for LogicalOp

source§

impl JsonSchema for PatKind

source§

impl JsonSchema for PatRangeBoundary

source§

impl JsonSchema for StmtKind

source§

impl JsonSchema for AdtFlags

source§

impl JsonSchema for AdtKind

source§

impl JsonSchema for AliasKind

source§

impl JsonSchema for AliasRelationDirection

source§

impl JsonSchema for Align

source§

impl JsonSchema for AssocItemContainer

source§

impl JsonSchema for AssocKind

source§

impl JsonSchema for BoundRegionKind

source§

impl JsonSchema for BoundTyKind

source§

impl JsonSchema for BoundVariableKind

source§

impl JsonSchema for CanonicalTyVarKind

source§

impl JsonSchema for CanonicalVarInfo

source§

impl JsonSchema for ClauseKind

source§

impl JsonSchema for ClosureKind

source§

impl JsonSchema for DiscriminantDefinition

source§

impl JsonSchema for DynKind

source§

impl JsonSchema for ExistentialPredicate

source§

impl JsonSchema for FloatTy

source§

impl JsonSchema for GenericArg

source§

impl JsonSchema for GenericParamDefKind

source§

impl JsonSchema for ImplTraitInTraitData

source§

impl JsonSchema for InferTy

source§

impl JsonSchema for IntTy

source§

impl JsonSchema for IntegerType

source§

impl JsonSchema for LitIntType

source§

impl JsonSchema for NormalizesTo

source§

impl JsonSchema for PointerCoercion

source§

impl JsonSchema for PredicateKind

source§

impl JsonSchema for RegionKind

source§

impl JsonSchema for ReprFlags

source§

impl JsonSchema for hax_frontend_exporter::types::ty::ScalarInt

source§

impl JsonSchema for Term

source§

impl JsonSchema for TyKind

source§

impl JsonSchema for UintTy

source§

impl JsonSchema for UserType

source§

impl JsonSchema for Variance

source§

impl JsonSchema for ConstantFieldExpr

source§

impl JsonSchema for Id

source§

impl JsonSchema for PathBuf

source§

impl JsonSchema for ImplExpr

source§

impl JsonSchema for DefId

source§

impl JsonSchema for DefIdContents

source§

impl JsonSchema for DisambiguatedDefPathItem

source§

impl JsonSchema for AttrItem

source§

impl JsonSchema for Attribute

source§

impl JsonSchema for BindingMode

source§

impl JsonSchema for DelimArgs

source§

impl JsonSchema for FnDecl

source§

impl JsonSchema for FnHeader

source§

impl JsonSchema for FnSig

source§

impl JsonSchema for HirFieldDef

source§

impl JsonSchema for HirId

source§

impl JsonSchema for MacroDef

source§

impl JsonSchema for MacroInvokation

source§

impl JsonSchema for MetaItemLit

source§

impl JsonSchema for NormalAttr

source§

impl JsonSchema for PathSegment

source§

impl JsonSchema for UsePath

source§

impl JsonSchema for Built

source§

impl JsonSchema for CTFE

source§

impl JsonSchema for Elaborated

source§

impl JsonSchema for Optimized

source§

impl JsonSchema for Promoted

source§

impl JsonSchema for BasicBlockData

source§

impl JsonSchema for Constant

source§

impl JsonSchema for CopyNonOverlapping

source§

impl JsonSchema for Instance

source§

impl JsonSchema for LocalDecl

source§

impl JsonSchema for Place

source§

impl JsonSchema for hax_frontend_exporter::types::mir::ScalarInt

source§

impl JsonSchema for Scope

source§

impl JsonSchema for SourceInfo

source§

impl JsonSchema for SourceScopeData

source§

impl JsonSchema for SourceScopeLocalData

source§

impl JsonSchema for Statement

source§

impl JsonSchema for Terminator

source§

impl JsonSchema for ImplInfos

source§

impl JsonSchema for ItemAttributes

source§

impl JsonSchema for PredicateId

source§

impl JsonSchema for TypedConstantKind

source§

impl JsonSchema for VariantInformations

source§

impl JsonSchema for ExpnData

source§

impl JsonSchema for Loc

source§

impl JsonSchema for Span

source§

impl JsonSchema for AdtExpr

source§

impl JsonSchema for Arm

source§

impl JsonSchema for Ascription

source§

impl JsonSchema for Block

source§

impl JsonSchema for FieldExpr

source§

impl JsonSchema for FieldPat

source§

impl JsonSchema for FruInfo

source§

impl JsonSchema for LocalIdent

source§

impl JsonSchema for Param

source§

impl JsonSchema for PatRange

source§

impl JsonSchema for Stmt

source§

impl JsonSchema for AdtDef

source§

impl JsonSchema for Alias

source§

impl JsonSchema for AssocItem

source§

impl JsonSchema for BoundRegion

source§

impl JsonSchema for BoundTy

source§

impl JsonSchema for CanonicalUserTypeAnnotation

source§

impl JsonSchema for Clause

source§

impl JsonSchema for ClosureArgs

source§

impl JsonSchema for CoercePredicate

source§

impl JsonSchema for DiscriminantValue

source§

impl JsonSchema for EarlyParamRegion

source§

impl JsonSchema for ExistentialProjection

source§

impl JsonSchema for ExistentialTraitRef

source§

impl JsonSchema for FieldDef

source§

impl JsonSchema for GenericParamDef

source§

impl JsonSchema for GenericPredicates

source§

impl JsonSchema for LateParamRegion

source§

impl JsonSchema for ParamConst

source§

impl JsonSchema for ParamTy

source§

impl JsonSchema for Predicate

source§

impl JsonSchema for ProjectionPredicate

source§

impl JsonSchema for Region

source§

impl JsonSchema for ReprOptions

source§

impl JsonSchema for SubtypePredicate

source§

impl JsonSchema for TraitPredicate

source§

impl JsonSchema for TraitRef

source§

impl JsonSchema for Ty

source§

impl JsonSchema for TyFnSig

source§

impl JsonSchema for TyGenerics

source§

impl JsonSchema for TypeAndMut

source§

impl JsonSchema for UserArgs

source§

impl JsonSchema for UserSelfTy

source§

impl JsonSchema for VariantDef

source§

impl<Body: IsBody + JsonSchema> JsonSchema for ConstArgKind<Body>

source§

impl<Body: IsBody + JsonSchema> JsonSchema for ForeignItemKind<Body>

source§

impl<Body: IsBody + JsonSchema> JsonSchema for GenericParamKind<Body>

source§

impl<Body: IsBody + JsonSchema> JsonSchema for ImplItemKind<Body>

source§

impl<Body: IsBody + JsonSchema> JsonSchema for ItemKind<Body>

source§

impl<Body: IsBody + JsonSchema> JsonSchema for TraitItemKind<Body>

source§

impl<Body: IsBody + JsonSchema> JsonSchema for AnonConst<Body>

source§

impl<Body: IsBody + JsonSchema> JsonSchema for ConstArg<Body>

source§

impl<Body: IsBody + JsonSchema> JsonSchema for FnDef<Body>

source§

impl<Body: IsBody + JsonSchema> JsonSchema for ForeignItem<Body>

source§

impl<Body: IsBody + JsonSchema> JsonSchema for GenericParam<Body>

source§

impl<Body: IsBody + JsonSchema> JsonSchema for Generics<Body>

source§

impl<Body: IsBody + JsonSchema> JsonSchema for Impl<Body>

source§

impl<Body: IsBody + JsonSchema> JsonSchema for ImplItem<Body>

source§

impl<Body: IsBody + JsonSchema> JsonSchema for Item<Body>

source§

impl<Body: IsBody + JsonSchema> JsonSchema for OpaqueTy<Body>

source§

impl<Body: IsBody + JsonSchema> JsonSchema for TraitItem<Body>

source§

impl<Body: IsBody + JsonSchema> JsonSchema for Variant<Body>

source§

impl<Body: JsonSchema> JsonSchema for FullDefKind<Body>

source§

impl<Body: JsonSchema> JsonSchema for ImplAssocItemValue<Body>

source§

impl<Body: JsonSchema> JsonSchema for FullDef<Body>

source§

impl<Body: JsonSchema> JsonSchema for ImplAssocItem<Body>

source§

impl<I: 'static + JsonSchema, T: 'static + JsonSchema> JsonSchema for IndexVec<I, T>

source§

impl<Id: JsonSchema> JsonSchema for Visibility<Id>

source§

impl<K, V, H> JsonSchema for HashMap<K, V, H>
where V: JsonSchema,

source§

impl<KIND: JsonSchema> JsonSchema for MirBody<KIND>

source§

impl<T> JsonSchema for Rc<T>
where T: JsonSchema + ?Sized,

source§

impl<T: 'static + SupportedType<Value> + JsonSchema> JsonSchema for Node<T>

source§

impl<T: JsonSchema> JsonSchema for ClearCrossCrate<T>

source§

impl<T: JsonSchema> JsonSchema for NodeRepr<T>

source§

impl<T: JsonSchema> JsonSchema for Spanned<T>

source§

impl<T: JsonSchema> JsonSchema for Binder<T>

source§

impl<T: JsonSchema> JsonSchema for Canonical<T>

source§

impl<T: JsonSchema> JsonSchema for Decorated<T>

source§

impl<T: JsonSchema> JsonSchema for OutlivesPredicate<T>

source§

impl<T: JsonSchema> JsonSchema for Placeholder<T>