Skip to main content

Kits

Struct Kits 

Source
pub struct Kits {
    pub scalar: Option<ScalarKit>,
    pub input: bool,
    pub output: bool,
    pub marker: Option<ElementFamily>,
    pub filter: bool,
    pub cursor: bool,
    pub databases: Vec<DatabaseKind>,
}
Expand description

Every kit a declaration opted into.

PLAIN, for ElementModel’s reason — public fields, no constructor, no validation. What is checked is checked at the FRONT END, where the tokens an author wrote are still in hand and a refusal can point at one.

Fields§

§scalar: Option<ScalarKit>

graphql(async_graphql(scalar(…))) — the type’s own GraphQL scalar.

§input: bool

graphql(async_graphql(input)) — [ToGraphqlInput].

§output: bool

graphql(async_graphql(output)) — [ToGraphqlOutput].

§marker: Option<ElementFamily>

marker(<family>) — the interpretation a FIELD of this type is read under.

§filter: bool

filter — the family’s filter, reached through a reading this device mints.

§cursor: bool

cursor — [CursorValue], a keyset position.

§databases: Vec<DatabaseKind>

sqlite / postgres / mysql — the dialects this type is a column in.

Implementations§

Source§

impl Kits

Source

pub fn is_empty(&self) -> bool

Whether the declaration asked for ANYTHING.

Source

pub fn gate(&self) -> Option<&Gate>

The door, where one was declared — scalar’s, since that is the only block it lives in.

Trait Implementations§

Source§

impl Default for Kits

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl !Send for Kits

§

impl !Sync for Kits

§

impl Freeze for Kits

§

impl RefUnwindSafe for Kits

§

impl Unpin for Kits

§

impl UnsafeUnpin for Kits

§

impl UnwindSafe for Kits

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> 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, 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.