[−][src]Struct async_graphql::WebSocketTransport
WebSocket transport
Methods
impl WebSocketTransport
[src]
pub fn new<F: Fn(Value) -> Data + Send + Sync + 'static>(
init_with_payload: F
) -> Self
[src]
init_with_payload: F
) -> Self
Creates a websocket transport and sets the function that converts the payload
of the connect_init
message to Data
.
Trait Implementations
impl Default for WebSocketTransport
[src]
fn default() -> WebSocketTransport
[src]
impl SubscriptionTransport for WebSocketTransport
[src]
type Error = String
The error type.
fn handle_request<'life0, 'life1, 'life2, 'async_trait, Query, Mutation, Subscription>(
&'life0 mut self,
schema: &'life1 Schema<Query, Mutation, Subscription>,
streams: &'life2 mut SubscriptionStreams,
data: Bytes
) -> Pin<Box<dyn Future<Output = Result<Option<Bytes>, Self::Error>> + Send + 'async_trait>> where
Query: ObjectType + Sync + Send + 'static,
Mutation: ObjectType + Sync + Send + 'static,
Subscription: SubscriptionType + Sync + Send + 'static,
Query: 'async_trait,
Mutation: 'async_trait,
Subscription: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
schema: &'life1 Schema<Query, Mutation, Subscription>,
streams: &'life2 mut SubscriptionStreams,
data: Bytes
) -> Pin<Box<dyn Future<Output = Result<Option<Bytes>, Self::Error>> + Send + 'async_trait>> where
Query: ObjectType + Sync + Send + 'static,
Mutation: ObjectType + Sync + Send + 'static,
Subscription: SubscriptionType + Sync + Send + 'static,
Query: 'async_trait,
Mutation: 'async_trait,
Subscription: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn handle_response(&mut self, id: usize, value: Value) -> Option<Bytes>
[src]
Auto Trait Implementations
impl !RefUnwindSafe for WebSocketTransport
impl Send for WebSocketTransport
impl Sync for WebSocketTransport
impl Unpin for WebSocketTransport
impl !UnwindSafe for WebSocketTransport
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,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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.
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.
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>,