pub trait SubscriptionType: Send + Sync {
    fn type_name() -> Cow<'static, str>;
    fn create_type_info(registry: &mut Registry) -> String;

    fn qualified_type_name() -> String { ... }
}
Expand description

A GraphQL subscription object

Required Methods§

Type the name.

Create type information in the registry and return qualified typename.

Provided Methods§

Qualified typename.

Examples found in repository?
src/registry/mod.rs (line 706)
695
696
697
698
699
700
701
702
703
704
705
706
707
    pub fn create_subscription_type<T, F>(&mut self, mut f: F) -> String
    where
        T: SubscriptionType + ?Sized,
        F: FnMut(&mut Registry) -> MetaType,
    {
        self.create_type(
            &mut f,
            &T::type_name(),
            std::any::type_name::<T>(),
            MetaTypeId::Object,
        );
        T::qualified_type_name()
    }

Implementations on Foreign Types§

Implementors§