[−][src]Struct async_graphql::http::WebSocket
pub struct WebSocket<S, F, Query, Mutation, Subscription> { /* fields omitted */ }
A GraphQL connection over websocket.
Implementations
impl<S, Query, Mutation, Subscription> WebSocket<S, fn(_: Value) -> Result<Data>, Query, Mutation, Subscription>
[src][−]
#[must_use]pub fn new(
schema: Schema<Query, Mutation, Subscription>,
stream: S,
protocol: Protocols
) -> Self
[src][−]
schema: Schema<Query, Mutation, Subscription>,
stream: S,
protocol: Protocols
) -> Self
Create a new websocket.
impl<S, F, Query, Mutation, Subscription> WebSocket<S, F, Query, Mutation, Subscription>
[src][−]
#[must_use]pub fn with_data(
schema: Schema<Query, Mutation, Subscription>,
stream: S,
data_initializer: Option<F>,
protocol: Protocols
) -> Self
[src][−]
schema: Schema<Query, Mutation, Subscription>,
stream: S,
data_initializer: Option<F>,
protocol: Protocols
) -> Self
Create a new websocket with a data initialization function.
This function, if present, will be called with the data sent by the client in the
GQL_CONNECTION_INIT
message.
From that point on the returned data will be accessible to all requests.
Trait Implementations
impl<S, F, Query, Mutation, Subscription> Stream for WebSocket<S, F, Query, Mutation, Subscription> where
S: Stream,
S::Item: AsRef<[u8]>,
F: FnOnce(Value) -> Result<Data>,
Query: ObjectType + 'static,
Mutation: ObjectType + 'static,
Subscription: SubscriptionType + 'static,
[src][+]
S: Stream,
S::Item: AsRef<[u8]>,
F: FnOnce(Value) -> Result<Data>,
Query: ObjectType + 'static,
Mutation: ObjectType + 'static,
Subscription: SubscriptionType + 'static,
type Item = String
Values yielded by the stream.
pub fn poll_next(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Option<Self::Item>>
[src][−]
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Option<Self::Item>>
Attempt to pull out the next value of this stream, registering the
current task for wakeup if the value is not yet available, and returning
None
if the stream is exhausted. Read more
pub fn size_hint(&self) -> (usize, Option<usize>)
[−]
Returns the bounds on the remaining length of the stream. Read more
impl<'__pin, S, F, Query, Mutation, Subscription> Unpin for WebSocket<S, F, Query, Mutation, Subscription> where
__Origin<'__pin, S, F, Query, Mutation, Subscription>: Unpin,
[src]
__Origin<'__pin, S, F, Query, Mutation, Subscription>: Unpin,
Auto Trait Implementations
impl<S, F, Query, Mutation, Subscription> !RefUnwindSafe for WebSocket<S, F, Query, Mutation, Subscription>
[src]
impl<S, F, Query, Mutation, Subscription> Send for WebSocket<S, F, Query, Mutation, Subscription> where
F: Send,
Mutation: Send + Sync,
Query: Send + Sync,
S: Send,
Subscription: Send + Sync,
[src]
F: Send,
Mutation: Send + Sync,
Query: Send + Sync,
S: Send,
Subscription: Send + Sync,
impl<S, F, Query, Mutation, Subscription> !Sync for WebSocket<S, F, Query, Mutation, Subscription>
[src]
impl<S, F, Query, Mutation, Subscription> !UnwindSafe for WebSocket<S, F, Query, Mutation, Subscription>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
pub fn type_id(&self) -> TypeId
[src][−]
Gets the TypeId
of self
. Read more
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
pub fn borrow(&self) -> &T
[src][−]
Immutably borrows from an owned value. Read more
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src][−]
Mutably borrows from an owned value. Read more
impl<T> From<T> for T
[src][+]
impl<T> Instrument for T
[src][+]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src][−]
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
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> Same<T> for T
type Output = T
Should always be Self
impl<T> StreamExt for T where
T: Stream + ?Sized,
[src][+]
T: Stream + ?Sized,
pub fn next(&mut self) -> Next<'_, Self> where
Self: Unpin,
[src][−]
Self: Unpin,
Creates a future that resolves to the next item in the stream. Read more
pub fn into_future(self) -> StreamFuture<Self> where
Self: Unpin,
[src][−]
Self: Unpin,
Converts this stream into a future of (next_item, tail_of_stream)
.
If the stream terminates, then the next item is None
. Read more
pub fn map<T, F>(self, f: F) -> Map<Self, F> where
F: FnMut(Self::Item) -> T,
[src][−]
F: FnMut(Self::Item) -> T,
Maps this stream's items to a different type, returning a new stream of the resulting type. Read more
pub fn enumerate(self) -> Enumerate<Self>
[src][−]
Creates a stream which gives the current iteration count as well as the next value. Read more
pub fn filter<Fut, F>(self, f: F) -> Filter<Self, Fut, F> where
F: FnMut(&Self::Item) -> Fut,
Fut: Future<Output = bool>,
[src][−]
F: FnMut(&Self::Item) -> Fut,
Fut: Future<Output = bool>,
Filters the values produced by this stream according to the provided asynchronous predicate. Read more
pub fn filter_map<Fut, T, F>(self, f: F) -> FilterMap<Self, Fut, F> where
F: FnMut(Self::Item) -> Fut,
Fut: Future<Output = Option<T>>,
[src][−]
F: FnMut(Self::Item) -> Fut,
Fut: Future<Output = Option<T>>,
Filters the values produced by this stream while simultaneously mapping them to a different type according to the provided asynchronous closure. Read more
pub fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F> where
F: FnMut(Self::Item) -> Fut,
Fut: Future,
[src][−]
F: FnMut(Self::Item) -> Fut,
Fut: Future,
Computes from this stream's items new items of a different type using an asynchronous closure. Read more
pub fn collect<C>(self) -> Collect<Self, C> where
C: Default + Extend<Self::Item>,
[src][−]
C: Default + Extend<Self::Item>,
Transforms a stream into a collection, returning a future representing the result of that computation. Read more
pub fn unzip<A, B, FromA, FromB>(self) -> Unzip<Self, FromA, FromB> where
Self: Stream<Item = (A, B)>,
FromA: Default + Extend<A>,
FromB: Default + Extend<B>,
[src][−]
Self: Stream<Item = (A, B)>,
FromA: Default + Extend<A>,
FromB: Default + Extend<B>,
Converts a stream of pairs into a future, which resolves to pair of containers. Read more
pub fn concat(self) -> Concat<Self> where
Self::Item: Extend<<Self::Item as IntoIterator>::Item>,
Self::Item: IntoIterator,
Self::Item: Default,
[src][−]
Self::Item: Extend<<Self::Item as IntoIterator>::Item>,
Self::Item: IntoIterator,
Self::Item: Default,
Concatenate all items of a stream into a single extendable destination, returning a future representing the end result. Read more
pub fn cycle(self) -> Cycle<Self> where
Self: Clone,
[src][−]
Self: Clone,
Repeats a stream endlessly. Read more
pub fn fold<T, Fut, F>(self, init: T, f: F) -> Fold<Self, Fut, T, F> where
F: FnMut(T, Self::Item) -> Fut,
Fut: Future<Output = T>,
[src][−]
F: FnMut(T, Self::Item) -> Fut,
Fut: Future<Output = T>,
Execute an accumulating asynchronous computation over a stream, collecting all the values into one final result. Read more
pub fn flatten(self) -> Flatten<Self> where
Self::Item: Stream,
[src][−]
Self::Item: Stream,
Flattens a stream of streams into just one continuous stream. Read more
pub fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F> where
U: Stream,
F: FnMut(Self::Item) -> U,
[src][−]
U: Stream,
F: FnMut(Self::Item) -> U,
Maps a stream like StreamExt::map
but flattens nested Stream
s. Read more
pub fn scan<S, B, Fut, F>(self, initial_state: S, f: F) -> Scan<Self, S, Fut, F> where
F: FnMut(&mut S, Self::Item) -> Fut,
Fut: Future<Output = Option<B>>,
[src][−]
F: FnMut(&mut S, Self::Item) -> Fut,
Fut: Future<Output = Option<B>>,
Combinator similar to StreamExt::fold
that holds internal state
and produces a new stream. Read more
pub fn skip_while<Fut, F>(self, f: F) -> SkipWhile<Self, Fut, F> where
F: FnMut(&Self::Item) -> Fut,
Fut: Future<Output = bool>,
[src][−]
F: FnMut(&Self::Item) -> Fut,
Fut: Future<Output = bool>,
Skip elements on this stream while the provided asynchronous predicate
resolves to true
. Read more
pub fn take_while<Fut, F>(self, f: F) -> TakeWhile<Self, Fut, F> where
F: FnMut(&Self::Item) -> Fut,
Fut: Future<Output = bool>,
[src][−]
F: FnMut(&Self::Item) -> Fut,
Fut: Future<Output = bool>,
Take elements from this stream while the provided asynchronous predicate
resolves to true
. Read more
pub fn take_until<Fut>(self, fut: Fut) -> TakeUntil<Self, Fut> where
Fut: Future,
[src][−]
Fut: Future,
Take elements from this stream until the provided future resolves. Read more
pub fn for_each<Fut, F>(self, f: F) -> ForEach<Self, Fut, F> where
F: FnMut(Self::Item) -> Fut,
Fut: Future<Output = ()>,
[src][−]
F: FnMut(Self::Item) -> Fut,
Fut: Future<Output = ()>,
Runs this stream to completion, executing the provided asynchronous closure for each element on the stream. Read more
pub fn for_each_concurrent<Fut, F>(
self,
limit: impl Into<Option<usize>>,
f: F
) -> ForEachConcurrent<Self, Fut, F> where
F: FnMut(Self::Item) -> Fut,
Fut: Future<Output = ()>,
[src][−]
self,
limit: impl Into<Option<usize>>,
f: F
) -> ForEachConcurrent<Self, Fut, F> where
F: FnMut(Self::Item) -> Fut,
Fut: Future<Output = ()>,
Runs this stream to completion, executing the provided asynchronous closure for each element on the stream concurrently as elements become available. Read more
pub fn take(self, n: usize) -> Take<Self>
[src][−]
Creates a new stream of at most n
items of the underlying stream. Read more
pub fn skip(self, n: usize) -> Skip<Self>
[src][−]
Creates a new stream which skips n
items of the underlying stream. Read more
pub fn fuse(self) -> Fuse<Self>
[src][−]
Fuse a stream such that poll_next
will never
again be called once it has finished. This method can be used to turn
any Stream
into a FusedStream
. Read more
pub fn by_ref(&mut self) -> &mut Self
[src][−]
Borrows a stream, rather than consuming it. Read more
pub fn catch_unwind(self) -> CatchUnwind<Self> where
Self: UnwindSafe,
[src][−]
Self: UnwindSafe,
Catches unwinding panics while polling the stream. Read more
pub fn boxed<'a>(
self
) -> Pin<Box<dyn Stream<Item = Self::Item> + 'a + Send, Global>> where
Self: Send + 'a,
[src][−]
self
) -> Pin<Box<dyn Stream<Item = Self::Item> + 'a + Send, Global>> where
Self: Send + 'a,
Wrap the stream in a Box, pinning it. Read more
pub fn boxed_local<'a>(
self
) -> Pin<Box<dyn Stream<Item = Self::Item> + 'a, Global>> where
Self: 'a,
[src][−]
self
) -> Pin<Box<dyn Stream<Item = Self::Item> + 'a, Global>> where
Self: 'a,
Wrap the stream in a Box, pinning it. Read more
pub fn buffered(self, n: usize) -> Buffered<Self> where
Self::Item: Future,
[src][−]
Self::Item: Future,
An adaptor for creating a buffered list of pending futures. Read more
pub fn buffer_unordered(self, n: usize) -> BufferUnordered<Self> where
Self::Item: Future,
[src][−]
Self::Item: Future,
An adaptor for creating a buffered list of pending futures (unordered). Read more
pub fn zip<St>(self, other: St) -> Zip<Self, St> where
St: Stream,
[src][−]
St: Stream,
An adapter for zipping two streams together. Read more
pub fn chain<St>(self, other: St) -> Chain<Self, St> where
St: Stream<Item = Self::Item>,
[src][−]
St: Stream<Item = Self::Item>,
Adapter for chaining two streams. Read more
pub fn peekable(self) -> Peekable<Self>
[src][−]
Creates a new stream which exposes a peek
method. Read more
pub fn chunks(self, capacity: usize) -> Chunks<Self>
[src][−]
An adaptor for chunking up items of the stream inside a vector. Read more
pub fn ready_chunks(self, capacity: usize) -> ReadyChunks<Self>
[src][−]
An adaptor for chunking up ready items of the stream inside a vector. Read more
pub fn forward<S>(self, sink: S) -> Forward<Self, S> where
Self: TryStream,
S: Sink<Self::Ok, Error = Self::Error>,
[src][−]
Self: TryStream,
S: Sink<Self::Ok, Error = Self::Error>,
A future that completes after the given stream has been fully processed into the sink and the sink has been flushed and closed. Read more
pub fn split<Item>(self) -> (SplitSink<Self, Item>, SplitStream<Self>) where
Self: Sink<Item>,
[src][−]
Self: Sink<Item>,
Splits this Stream + Sink
object into separate Sink
and Stream
objects. Read more
pub fn inspect<F>(self, f: F) -> Inspect<Self, F> where
F: FnMut(&Self::Item),
[src][−]
F: FnMut(&Self::Item),
Do something with each item of this stream, afterwards passing it on. Read more
pub fn left_stream<B>(self) -> Either<Self, B> where
B: Stream<Item = Self::Item>,
[src][−]
B: Stream<Item = Self::Item>,
Wrap this stream in an Either
stream, making it the left-hand variant
of that Either
. Read more
pub fn right_stream<B>(self) -> Either<B, Self> where
B: Stream<Item = Self::Item>,
[src][−]
B: Stream<Item = Self::Item>,
Wrap this stream in an Either
stream, making it the right-hand variant
of that Either
. Read more
pub fn poll_next_unpin(
&mut self,
cx: &mut Context<'_>
) -> Poll<Option<Self::Item>> where
Self: Unpin,
[src][−]
&mut self,
cx: &mut Context<'_>
) -> Poll<Option<Self::Item>> where
Self: Unpin,
pub fn select_next_some(&mut self) -> SelectNextSome<'_, Self> where
Self: Unpin + FusedStream,
[src][−]
Self: Unpin + FusedStream,
impl<S> StreamExt for S where
S: Stream + ?Sized,
[+]
S: Stream + ?Sized,
pub fn poll_next(&mut self, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> where
Self: Unpin,
[−]
Self: Unpin,
A convenience for calling [Stream::poll_next()
] on !
Unpin
types.
pub fn next(&mut self) -> NextFuture<'_, Self> where
Self: Unpin,
[−]
Self: Unpin,
Retrieves the next item in the stream. Read more
pub fn try_next<T, E>(&mut self) -> TryNextFuture<'_, Self> where
Self: Stream<Item = Result<T, E>> + Unpin,
[−]
Self: Stream<Item = Result<T, E>> + Unpin,
Retrieves the next item in the stream. Read more
pub fn count(self) -> CountFuture<Self>
[−]
Counts the number of items in the stream. Read more
pub fn map<T, F>(self, f: F) -> Map<Self, F> where
F: FnMut(Self::Item) -> T,
[−]
F: FnMut(Self::Item) -> T,
Maps items of the stream to new values using a closure. Read more
pub fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F> where
U: Stream,
F: FnMut(Self::Item) -> U,
[−]
U: Stream,
F: FnMut(Self::Item) -> U,
Maps items to streams and then concatenates them. Read more
pub fn flatten(self) -> Flatten<Self> where
Self::Item: Stream,
[−]
Self::Item: Stream,
Concatenates inner streams. Read more
pub fn then<F, Fut>(self, f: F) -> Then<Self, F, Fut> where
F: FnMut(Self::Item) -> Fut,
Fut: Future,
[−]
F: FnMut(Self::Item) -> Fut,
Fut: Future,
Maps items of the stream to new values using an async closure. Read more
pub fn filter<P>(self, predicate: P) -> Filter<Self, P> where
P: FnMut(&Self::Item) -> bool,
[−]
P: FnMut(&Self::Item) -> bool,
Keeps items of the stream for which predicate
returns true
. Read more
pub fn filter_map<T, F>(self, f: F) -> FilterMap<Self, F> where
F: FnMut(Self::Item) -> Option<T>,
[−]
F: FnMut(Self::Item) -> Option<T>,
Filters and maps items of the stream using a closure. Read more
pub fn take(self, n: usize) -> Take<Self>
[−]
Takes only the first n
items of the stream. Read more
pub fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P> where
P: FnMut(&Self::Item) -> bool,
[−]
P: FnMut(&Self::Item) -> bool,
Takes items while predicate
returns true
. Read more
pub fn skip(self, n: usize) -> Skip<Self>
[−]
Skips the first n
items of the stream. Read more
pub fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P> where
P: FnMut(&Self::Item) -> bool,
[−]
P: FnMut(&Self::Item) -> bool,
Skips items while predicate
returns true
. Read more
pub fn step_by(self, step: usize) -> StepBy<Self>
[−]
Yields every step
th item. Read more
pub fn chain<U>(self, other: U) -> Chain<Self, U> where
U: Stream<Item = Self::Item>,
[−]
U: Stream<Item = Self::Item>,
Appends another stream to the end of this one. Read more
pub fn cloned<'a, T>(self) -> Cloned<Self> where
Self: Stream<Item = &'a T>,
T: Clone + 'a,
[−]
Self: Stream<Item = &'a T>,
T: Clone + 'a,
Clones all items. Read more
pub fn copied<'a, T>(self) -> Copied<Self> where
Self: Stream<Item = &'a T>,
T: Copy + 'a,
[−]
Self: Stream<Item = &'a T>,
T: Copy + 'a,
Copies all items. Read more
pub fn collect<C>(self) -> CollectFuture<Self, C> where
C: Default + Extend<Self::Item>,
[−]
C: Default + Extend<Self::Item>,
Collects all items in the stream into a collection. Read more
pub fn try_collect<T, E, C>(self) -> TryCollectFuture<Self, C> where
Self: Stream<Item = Result<T, E>>,
C: Default + Extend<T>,
[−]
Self: Stream<Item = Result<T, E>>,
C: Default + Extend<T>,
Collects all items in the fallible stream into a collection. Read more
pub fn partition<B, P>(self, predicate: P) -> PartitionFuture<Self, P, B> where
B: Default + Extend<Self::Item>,
P: FnMut(&Self::Item) -> bool,
[−]
B: Default + Extend<Self::Item>,
P: FnMut(&Self::Item) -> bool,
Partitions items into those for which predicate
is true
and those for which it is
false
, and then collects them into two collections. Read more
pub fn fold<T, F>(self, init: T, f: F) -> FoldFuture<Self, F, T> where
F: FnMut(T, Self::Item) -> T,
[−]
F: FnMut(T, Self::Item) -> T,
Accumulates a computation over the stream. Read more
pub fn try_fold<T, E, F, B>(
&mut self,
init: B,
f: F
) -> TryFoldFuture<'_, Self, F, B> where
Self: Stream<Item = Result<T, E>> + Unpin,
F: FnMut(B, T) -> Result<B, E>,
[−]
&mut self,
init: B,
f: F
) -> TryFoldFuture<'_, Self, F, B> where
Self: Stream<Item = Result<T, E>> + Unpin,
F: FnMut(B, T) -> Result<B, E>,
Accumulates a fallible computation over the stream. Read more
pub fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F> where
F: FnMut(&mut St, Self::Item) -> Option<B>,
[−]
F: FnMut(&mut St, Self::Item) -> Option<B>,
Maps items of the stream to new values using a state value and a closure. Read more
pub fn fuse(self) -> Fuse<Self>
[−]
pub fn cycle(self) -> Cycle<Self> where
Self: Clone,
[−]
Self: Clone,
Repeats the stream from beginning to end, forever. Read more
pub fn enumerate(self) -> Enumerate<Self>
[−]
Enumerates items, mapping them to (index, item)
. Read more
pub fn inspect<F>(self, f: F) -> Inspect<Self, F> where
F: FnMut(&Self::Item),
[−]
F: FnMut(&Self::Item),
Calls a closure on each item and passes it on. Read more
pub fn nth(&mut self, n: usize) -> NthFuture<'_, Self> where
Self: Unpin,
[−]
Self: Unpin,
Gets the n
th item of the stream. Read more
pub fn last(self) -> LastFuture<Self>
[−]
Returns the last item in the stream. Read more
pub fn find<P>(&mut self, predicate: P) -> FindFuture<'_, Self, P> where
Self: Unpin,
P: FnMut(&Self::Item) -> bool,
[−]
Self: Unpin,
P: FnMut(&Self::Item) -> bool,
Finds the first item of the stream for which predicate
returns true
. Read more
pub fn find_map<F, B>(&mut self, f: F) -> FindMapFuture<'_, Self, F> where
Self: Unpin,
F: FnMut(Self::Item) -> Option<B>,
[−]
Self: Unpin,
F: FnMut(Self::Item) -> Option<B>,
pub fn position<P>(&mut self, predicate: P) -> PositionFuture<'_, Self, P> where
Self: Unpin,
P: FnMut(Self::Item) -> bool,
[−]
Self: Unpin,
P: FnMut(Self::Item) -> bool,
Finds the index of the first item of the stream for which predicate
returns true
. Read more
pub fn all<P>(&mut self, predicate: P) -> AllFuture<'_, Self, P> where
Self: Unpin,
P: FnMut(Self::Item) -> bool,
[−]
Self: Unpin,
P: FnMut(Self::Item) -> bool,
Tests if predicate
returns true
for all items in the stream. Read more
pub fn any<P>(&mut self, predicate: P) -> AnyFuture<'_, Self, P> where
Self: Unpin,
P: FnMut(Self::Item) -> bool,
[−]
Self: Unpin,
P: FnMut(Self::Item) -> bool,
Tests if predicate
returns true
for any item in the stream. Read more
pub fn for_each<F>(self, f: F) -> ForEachFuture<Self, F> where
F: FnMut(Self::Item),
[−]
F: FnMut(Self::Item),
Calls a closure on each item of the stream. Read more
pub fn try_for_each<F, E>(&mut self, f: F) -> TryForEachFuture<'_, Self, F> where
Self: Unpin,
F: FnMut(Self::Item) -> Result<(), E>,
[−]
Self: Unpin,
F: FnMut(Self::Item) -> Result<(), E>,
Calls a fallible closure on each item of the stream, stopping on first error. Read more
pub fn zip<U>(self, other: U) -> Zip<Self, U> where
U: Stream,
[−]
U: Stream,
Zips up two streams into a single stream of pairs. Read more
pub fn unzip<A, B, FromA, FromB>(self) -> UnzipFuture<Self, FromA, FromB> where
Self: Stream<Item = (A, B)>,
FromA: Default + Extend<A>,
FromB: Default + Extend<B>,
[−]
Self: Stream<Item = (A, B)>,
FromA: Default + Extend<A>,
FromB: Default + Extend<B>,
Collects a stream of pairs into a pair of collections. Read more
pub fn or<S>(self, other: S) -> Or<Self, S> where
S: Stream<Item = Self::Item>,
[−]
S: Stream<Item = Self::Item>,
Merges with other
stream, preferring items from self
whenever both streams are ready. Read more
pub fn race<S>(self, other: S) -> Race<Self, S> where
S: Stream<Item = Self::Item>,
[−]
S: Stream<Item = Self::Item>,
Merges with other
stream, with no preference for either stream when both are ready. Read more
pub fn boxed<'a>(
self
) -> Pin<Box<dyn Stream<Item = Self::Item> + 'a + Send, Global>> where
Self: Send + 'a,
[−]
self
) -> Pin<Box<dyn Stream<Item = Self::Item> + 'a + Send, Global>> where
Self: Send + 'a,
Boxes the stream and changes its type to dyn Stream + Send + 'a
. Read more
pub fn boxed_local<'a>(
self
) -> Pin<Box<dyn Stream<Item = Self::Item> + 'a, Global>> where
Self: 'a,
[−]
self
) -> Pin<Box<dyn Stream<Item = Self::Item> + 'a, Global>> where
Self: 'a,
Boxes the stream and changes its type to dyn Stream + 'a
. Read more
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][−]
Performs the conversion.
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][−]
Performs the conversion.
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[+]
V: MultiLane<T>,