schema {
query: RootSchemaQuery
}
directive @filter(op: String!, value: [String!]) on FIELD | INLINE_FRAGMENT
directive @tag(name: String) on FIELD
directive @output(name: String) on FIELD
directive @optional on FIELD
directive @recurse(depth: Int!) on FIELD
directive @fold on FIELD
type RootSchemaQuery {
Crate: Crate!
CrateDiff: CrateDiff!
}
type CrateDiff {
current: Crate!
baseline: Crate
}
"""
https://docs.rs/rustdoc-types/0.11.0/rustdoc_types/struct.Crate.html
"""
type Crate {
root: String!
crate_version: String
includes_private: Boolean!
format_version: Int!
item: [Item!]
}
"""
https://docs.rs/rustdoc-types/0.11.0/rustdoc_types/struct.Item.html
https://docs.rs/rustdoc-types/0.11.0/rustdoc_types/enum.ItemEnum.html
"""
interface Item {
id: String!
crate_id: Int!
name: String
docs: String
attrs: [String!]!
# stringified version of the visibility struct field
visibility_limit: String!
span: Span
}
"""
https://docs.rs/rustdoc-types/0.11.0/rustdoc_types/struct.Item.html
https://docs.rs/rustdoc-types/0.11.0/rustdoc_types/enum.ItemEnum.html
https://docs.rs/rustdoc-types/0.11.0/rustdoc_types/struct.Struct.html
"""
type Struct implements Item & Importable & ImplOwner {
# properties from Item
id: String!
crate_id: Int!
name: String
docs: String
attrs: [String!]!
visibility_limit: String!
# own properties
struct_type: String!
fields_stripped: Boolean!
# edges from Item
span: Span
# edges from Importable
path: [Path!]
# edges from ImplOwner
"""
Any impl for this type.
All impl kinds are included:
- inherent impls: `impl Foo`
- explicit trait implementations: `impl Bar for Foo`
- blanket implementations: `impl<T> Bar for T`
"""
impl: [Impl!]
"""
Only inherent impls: implementations of the type itself (`impl Foo`).
The impls pointed to here are guaranteed to have no `trait` and no `blanket` edges.
This edge is just a convenience to simplify query-writing,
so we don't have to keep writing "@fold @transform(...) @filter(...)" chains
over the `trait` and `blanket` edges.
When Trustfall supports macro edges, this should just become a macro edge.
"""
inherent_impl: [Impl!]
# own edges
field: [StructField!]
}
"""
https://docs.rs/rustdoc-types/0.11.0/rustdoc_types/struct.Item.html
https://docs.rs/rustdoc-types/0.11.0/rustdoc_types/enum.ItemEnum.html
https://docs.rs/rustdoc-types/0.11.0/rustdoc_types/enum.Type.html
"""
type StructField implements Item {
# properties from Item
id: String!
crate_id: Int!
name: String
docs: String
attrs: [String!]!
visibility_limit: String!
# edges from Item
span: Span
}
"""
https://docs.rs/rustdoc-types/0.11.0/rustdoc_types/struct.Item.html
https://docs.rs/rustdoc-types/0.11.0/rustdoc_types/enum.ItemEnum.html
https://docs.rs/rustdoc-types/0.11.0/rustdoc_types/struct.Enum.html
"""
type Enum implements Item & Importable & ImplOwner {
# properties from Item
id: String!
crate_id: Int!
name: String
docs: String
attrs: [String!]!
visibility_limit: String!
# own properties
variants_stripped: Boolean!
# edges from Item
span: Span
# edges from Importable
path: [Path!]
# edges from ImplOwner
"""
Any impl for this type.
All impl kinds are included:
- inherent impls: `impl Foo`
- explicit trait implementations: `impl Bar for Foo`
- blanket implementations: `impl<T> Bar for T`
"""
impl: [Impl!]
"""
Only inherent impls: implementations of the type itself (`impl Foo`).
The impls pointed to here are guaranteed to have no `trait` and no `blanket` edges.
This edge is just a convenience to simplify query-writing,
so we don't have to keep writing "@fold @transform(...) @filter(...)" chains
over the `trait` and `blanket` edges.
When Trustfall supports macro edges, this should just become a macro edge.
"""
inherent_impl: [Impl!]
# own edges
variant: [Variant!]
}
"""
https://docs.rs/rustdoc-types/0.11.0/rustdoc_types/struct.Item.html
https://docs.rs/rustdoc-types/0.11.0/rustdoc_types/enum.ItemEnum.html
https://docs.rs/rustdoc-types/0.11.0/rustdoc_types/enum.Variant.html
"""
interface Variant implements Item {
# properties from Item
id: String!
crate_id: Int!
name: String
docs: String
attrs: [String!]!
visibility_limit: String!
# edges from Item
span: Span
}
"""
https://docs.rs/rustdoc-types/0.11.0/rustdoc_types/struct.Item.html
https://docs.rs/rustdoc-types/0.11.0/rustdoc_types/enum.ItemEnum.html
https://docs.rs/rustdoc-types/0.11.0/rustdoc_types/enum.Variant.html
"""
type PlainVariant implements Item & Variant {
# properties from Item
id: String!
crate_id: Int!
name: String
docs: String
attrs: [String!]!
visibility_limit: String!
# edges from Item
span: Span
}
"""
https://docs.rs/rustdoc-types/0.11.0/rustdoc_types/struct.Item.html
https://docs.rs/rustdoc-types/0.11.0/rustdoc_types/enum.ItemEnum.html
https://docs.rs/rustdoc-types/0.11.0/rustdoc_types/enum.Variant.html
"""
type TupleVariant implements Item & Variant {
# properties from Item
id: String!
crate_id: Int!
name: String
docs: String
attrs: [String!]!
visibility_limit: String!
# edges from Item
span: Span
}
"""
https://docs.rs/rustdoc-types/0.11.0/rustdoc_types/struct.Item.html
https://docs.rs/rustdoc-types/0.11.0/rustdoc_types/enum.ItemEnum.html
https://docs.rs/rustdoc-types/0.11.0/rustdoc_types/enum.Variant.html
"""
type StructVariant implements Item & Variant {
# properties from Item
id: String!
crate_id: Int!
name: String
docs: String
attrs: [String!]!
visibility_limit: String!
# edges from Item
span: Span
}
"""
https://docs.rs/rustdoc-types/0.11.0/rustdoc_types/struct.Span.html
"""
type Span {
filename: String!
begin_line: Int!
begin_column: Int!
end_line: Int!
end_column: Int!
}
"""
An item that can be imported, through one or more paths.
"""
interface Importable {
path: [Path!]
}
"""
An item that can have impl blocks, like a struct or enum.
"""
interface ImplOwner implements Item & Importable {
# properties from Item
id: String!
crate_id: Int!
name: String
docs: String
attrs: [String!]!
visibility_limit: String!
# edges from Item
span: Span
# edges from Importable
path: [Path!]
# own edges
"""
Any impl for this type.
All impl kinds are included:
- inherent impls: `impl Foo`
- explicit trait implementations: `impl Bar for Foo`
- blanket implementations: `impl<T> Bar for T`
"""
impl: [Impl!]
"""
Only inherent impls: implementations of the type itself (`impl Foo`).
The impls pointed to here are guaranteed to have no `trait` and no `blanket` edges.
This edge is just a convenience to simplify query-writing,
so we don't have to keep writing "@fold @transform(...) @filter(...)" chains
over the `trait` and `blanket` edges.
When Trustfall supports macro edges, this should just become a macro edge.
"""
inherent_impl: [Impl!]
}
"""
https://docs.rs/rustdoc-types/0.11.0/rustdoc_types/struct.Item.html
https://docs.rs/rustdoc-types/0.11.0/rustdoc_types/enum.ItemEnum.html
https://docs.rs/rustdoc-types/latest/rustdoc_types/struct.Impl.html
"""
type Impl implements Item {
# properties from Item
id: String!
crate_id: Int!
name: String
docs: String
attrs: [String!]!
# stringified version of the visibility struct field
visibility_limit: String!
# own properties
unsafe: Boolean!
negative: Boolean!
synthetic: Boolean!
# edges from Item
span: Span
# own edges
# """
# The trait being implemented. Inherent impls don't have a trait.
# TODO: implement me
# """
# trait: Trait
# """
# The generic type across which the blanket trait implementation is made.
# TODO: implement me
# """
# blanket: GenericType
"""
Methods defined in this impl.
"""
method: [Method!]
}
"""
A possible way that an item could be imported.
"""
type Path {
"""
The path from which the item can be imported.
"""
path: [String!]!
}
"""
A function-like entity, like a function, function pointer, or method.
Combines:
https://docs.rs/rustdoc-types/0.11.0/rustdoc_types/struct.Header.html
https://docs.rs/rustdoc-types/0.11.0/rustdoc_types/struct.FnDecl.html
"""
interface FunctionLike {
const: Boolean!
unsafe: Boolean!
async: Boolean!
}
"""
https://docs.rs/rustdoc-types/0.11.0/rustdoc_types/struct.Item.html
https://docs.rs/rustdoc-types/0.11.0/rustdoc_types/enum.ItemEnum.html
https://docs.rs/rustdoc-types/0.11.0/rustdoc_types/struct.Function.html
"""
type Function implements Item & FunctionLike & Importable {
# properties from Item
id: String!
crate_id: Int!
name: String
docs: String
attrs: [String!]!
visibility_limit: String!
# properties from FunctionLike
const: Boolean!
unsafe: Boolean!
async: Boolean!
# edges from Item
span: Span
# edges from Importable
path: [Path!]
}
"""
https://docs.rs/rustdoc-types/0.11.0/rustdoc_types/struct.Item.html
https://docs.rs/rustdoc-types/0.11.0/rustdoc_types/enum.ItemEnum.html
https://docs.rs/rustdoc-types/0.11.0/rustdoc_types/struct.Method.html
"""
type Method implements Item & FunctionLike {
# properties from Item
id: String!
crate_id: Int!
name: String
docs: String
attrs: [String!]!
visibility_limit: String!
# properties from FunctionLike
const: Boolean!
unsafe: Boolean!
async: Boolean!
# edge from Item
span: Span
}