[−][src]Struct warpgrapher::engine::config::Endpoint
Configuration item for custom endpoints
Examples
let e = Endpoint::new("CountItems".to_string(), EndpointClass::Query, None, EndpointType::new(TypeDef::Scalar(GraphqlType::Int), false, true));
Implementations
impl Endpoint
[src]
pub fn new(
name: String,
class: EndpointClass,
input: Option<EndpointType>,
output: EndpointType
) -> Endpoint
[src]
name: String,
class: EndpointClass,
input: Option<EndpointType>,
output: EndpointType
) -> Endpoint
Creates a new configuration item for a custom GraphQL endpoint
Examples
let e = Endpoint::new("CountItems".to_string(), EndpointClass::Query, None, EndpointType::new(TypeDef::Scalar(GraphqlType::Int), false, true));
pub fn class(&self) -> &EndpointClass
[src]
Returns the EndpointClass
of a custom GraphQL endpoint, indicating whether the custom
endpoint is a Query or Mutation.
Examples
let e = Endpoint::new("CountItems".to_string(), EndpointClass::Query, None, EndpointType::new(TypeDef::Scalar(GraphqlType::Int), false, true)); assert_eq!(&EndpointClass::Query, e.class());
pub fn name(&self) -> &str
[src]
Returns the name of a custom GraphQL endpoint.
Examples
let e = Endpoint::new("CountItems".to_string(), EndpointClass::Query, None, EndpointType::new(TypeDef::Scalar(GraphqlType::Int), false, true)); assert_eq!("CountItems", e.name());
pub fn input(&self) -> Option<&EndpointType>
[src]
Returns the optional type definition of the input to a custom endpoint. A value of None indicates that the GraphQL endpoint does not take an input.
Examples
let e = Endpoint::new("CountItems".to_string(), EndpointClass::Query, None, EndpointType::new(TypeDef::Scalar(GraphqlType::Int), false, true)); assert!(e.input().is_none());
pub fn output(&self) -> &EndpointType
[src]
Returns the type definition of the output for a custom endpoint
Examples
let e = Endpoint::new("CountItems".to_string(), EndpointClass::Query, None, EndpointType::new(TypeDef::Scalar(GraphqlType::Int), false, true)); assert_eq!(&EndpointType::new(TypeDef::Scalar(GraphqlType::Int), false, true), e.output());
Trait Implementations
impl Clone for Endpoint
[src]
impl Debug for Endpoint
[src]
impl<'de> Deserialize<'de> for Endpoint
[src]
pub fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Eq for Endpoint
[src]
impl Hash for Endpoint
[src]
pub fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for Endpoint
[src]
pub fn cmp(&self, other: &Endpoint) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<Endpoint> for Endpoint
[src]
impl PartialOrd<Endpoint> for Endpoint
[src]
pub fn partial_cmp(&self, other: &Endpoint) -> Option<Ordering>
[src]
pub fn lt(&self, other: &Endpoint) -> bool
[src]
pub fn le(&self, other: &Endpoint) -> bool
[src]
pub fn gt(&self, other: &Endpoint) -> bool
[src]
pub fn ge(&self, other: &Endpoint) -> bool
[src]
impl Serialize for Endpoint
[src]
pub fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralEq for Endpoint
[src]
impl StructuralPartialEq for Endpoint
[src]
impl<'_> TryFrom<&'_ str> for Endpoint
[src]
type Error = Error
The type returned in the event of a conversion error.
pub fn try_from(yaml: &str) -> Result<Endpoint, Error>
[src]
Creates a new Endpoint struct from a yaml-formatted string.
Errors
Returns an Error
variant DeserializationFailed
if the yaml-formatted
string is improperly formatted.
Examples
use warpgrapher::engine::config::{Endpoint}; use std::convert::TryFrom; let t = Endpoint::try_from(" name: RegisterUser class: Mutation input: type: UserInput output: type: User ").unwrap();
Auto Trait Implementations
impl RefUnwindSafe for Endpoint
[src]
impl Send for Endpoint
[src]
impl Sync for Endpoint
[src]
impl Unpin for Endpoint
[src]
impl UnwindSafe for Endpoint
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
pub fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,