Skip to main content

FrameworkConfig

Struct FrameworkConfig 

Source
pub struct FrameworkConfig<'a> {
    pub framework_import: Option<&'a str>,
    pub query_fn_name: &'a str,
    pub input_as_getter: bool,
    pub query_interfaces: &'a [&'a str],
    pub mutation_interfaces: &'a [&'a str],
    pub query_impl: &'a str,
    pub mutation_impl: &'a str,
}
Expand description

Configuration for generating a framework-specific reactive wrapper file.

Fields§

§framework_import: Option<&'a str>

Framework-specific import line (e.g. import { useState, ... } from "react";). None for Svelte which has no framework import.

§query_fn_name: &'a str

Name of the query function (e.g. "useQuery" or "createQuery").

§input_as_getter: bool

Whether non-void query input is a getter () => QueryInput<K> (Svelte/Vue/Solid) or a direct value QueryInput<K> (React).

§query_interfaces: &'a [&'a str]

TypeScript interface constants for queries (options, result).

§mutation_interfaces: &'a [&'a str]

TypeScript interface constants for mutations (options, result).

§query_impl: &'a str

Query implementation block (TypeScript source).

§mutation_impl: &'a str

Mutation implementation block (TypeScript source).

Auto Trait Implementations§

§

impl<'a> Freeze for FrameworkConfig<'a>

§

impl<'a> RefUnwindSafe for FrameworkConfig<'a>

§

impl<'a> Send for FrameworkConfig<'a>

§

impl<'a> Sync for FrameworkConfig<'a>

§

impl<'a> Unpin for FrameworkConfig<'a>

§

impl<'a> UnsafeUnpin for FrameworkConfig<'a>

§

impl<'a> UnwindSafe for FrameworkConfig<'a>

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