pub struct GraphqlConfig { /* private fields */ }Expand description
Configuration for GraphqlPlugin.
Implementations§
Source§impl GraphqlConfig
Fluent builder helpers for GraphqlConfig.
impl GraphqlConfig
Fluent builder helpers for GraphqlConfig.
Sourcepub fn with_endpoint<S>(self, endpoint: S) -> Self
pub fn with_endpoint<S>(self, endpoint: S) -> Self
Sets the exact endpoint path handled by GraphqlHook.
§Arguments
S- Endpoint path (for example"/graphql").
§Returns
Self- Updated configuration.
Sourcepub fn with_max_depth(self, max_depth: usize) -> Self
pub fn with_max_depth(self, max_depth: usize) -> Self
Sourcepub fn with_max_fields(self, max_fields: usize) -> Self
pub fn with_max_fields(self, max_fields: usize) -> Self
Source§impl GraphqlConfig
impl GraphqlConfig
pub fn get_endpoint(&self) -> &String
pub fn get_mut_endpoint(&mut self) -> &mut String
pub fn set_endpoint(&mut self, val: String) -> &mut Self
pub fn get_max_depth(&self) -> usize
pub fn get_mut_max_depth(&mut self) -> &mut usize
pub fn set_max_depth(&mut self, val: usize) -> &mut Self
pub fn get_max_fields(&self) -> usize
pub fn get_mut_max_fields(&mut self) -> &mut usize
pub fn set_max_fields(&mut self, val: usize) -> &mut Self
pub fn get_max_query_bytes(&self) -> usize
pub fn get_mut_max_query_bytes(&mut self) -> &mut usize
pub fn set_max_query_bytes(&mut self, val: usize) -> &mut Self
pub fn get_allow_get(&self) -> bool
pub fn get_mut_allow_get(&mut self) -> &mut bool
pub fn set_allow_get(&mut self, val: bool) -> &mut Self
Trait Implementations§
Source§impl Clone for GraphqlConfig
impl Clone for GraphqlConfig
Source§impl Debug for GraphqlConfig
impl Debug for GraphqlConfig
Source§impl Default for GraphqlConfig
Default construction for GraphqlConfig.
impl Default for GraphqlConfig
Default construction for GraphqlConfig.
Source§fn default() -> Self
fn default() -> Self
Builds a default GraphqlConfig serving /graphql with DoS depth and complexity limits.
§Returns
Self- Default configuration.
impl Eq for GraphqlConfig
Source§impl PartialEq for GraphqlConfig
impl PartialEq for GraphqlConfig
impl StructuralPartialEq for GraphqlConfig
Auto Trait Implementations§
impl Forget for GraphqlConfig
impl Freeze for GraphqlConfig
impl Move for GraphqlConfig
impl RefUnwindSafe for GraphqlConfig
impl Send for GraphqlConfigwhere
RawVecInner: Send,
impl Sync for GraphqlConfigwhere
RawVecInner: Sync,
impl Unpin for GraphqlConfig
impl UnsafeUnpin for GraphqlConfig
impl UnwindSafe for GraphqlConfigwhere
RawVecInner: UnwindSafe,
Blanket Implementations§
impl<T> AnySend for T
impl<T> AnySendClone for T
impl<T> AnySendSync for T
impl<T> AnySendSyncClone for T
impl<T> AnySync for T
impl<T> AnySyncClone for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.