pub struct IntrospectionResponses {
pub schema_response: String,
pub type_responses: HashMap<String, String>,
}Expand description
Pre-built introspection responses for fast serving.
Fields§
§schema_response: StringFull __schema response JSON.
type_responses: HashMap<String, String>Map of type name -> __type response JSON.
Implementations§
Source§impl IntrospectionResponses
impl IntrospectionResponses
Sourcepub fn build(schema: &CompiledSchema) -> Self
pub fn build(schema: &CompiledSchema) -> Self
Build introspection responses from compiled schema.
This is called once at server startup and cached.
Sourcepub fn get_type_response(&self, type_name: &str) -> String
pub fn get_type_response(&self, type_name: &str) -> String
Get response for __type(name: "...") query.
Trait Implementations§
Source§impl Clone for IntrospectionResponses
impl Clone for IntrospectionResponses
Source§fn clone(&self) -> IntrospectionResponses
fn clone(&self) -> IntrospectionResponses
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for IntrospectionResponses
impl RefUnwindSafe for IntrospectionResponses
impl Send for IntrospectionResponses
impl Sync for IntrospectionResponses
impl Unpin for IntrospectionResponses
impl UnsafeUnpin for IntrospectionResponses
impl UnwindSafe for IntrospectionResponses
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more