pub struct ServiceFs<ServiceObjTy: ServiceObjTrait> { /* private fields */ }
Expand description
A filesystem which connects clients to services.
This type implements the Stream
trait and will yield the values
returned from calling Service::connect
on the services it hosts.
This can be used to, for example, yield streams of channels, request streams, futures to run, or any other value that should be processed as the result of a request.
Implementations§
Source§impl<'a, Output: 'a> ServiceFs<ServiceObjLocal<'a, Output>>
impl<'a, Output: 'a> ServiceFs<ServiceObjLocal<'a, Output>>
Source§impl<'a, Output: 'a> ServiceFs<ServiceObj<'a, Output>>
impl<'a, Output: 'a> ServiceFs<ServiceObj<'a, Output>>
Source§impl<ServiceObjTy: ServiceObjTrait> ServiceFs<ServiceObjTy>
impl<ServiceObjTy: ServiceObjTrait> ServiceFs<ServiceObjTy>
Sourcepub fn root_dir(&mut self) -> ServiceFsDir<'_, ServiceObjTy>
pub fn root_dir(&mut self) -> ServiceFsDir<'_, ServiceObjTy>
Get a reference to the root directory as a ServiceFsDir
.
This can be useful when writing code which hosts some set of services on
a directory and wants to be agnostic to whether that directory
is the root ServiceFs
or a subdirectory.
Such a function can take an &mut ServiceFsDir<...>
as an argument,
allowing callers to provide either a subdirectory or fs.root_dir()
.
Sourcepub fn add_service_connector<F, P>(&mut self, service: F) -> &mut Selfwhere
F: FnMut(ServerEnd<P>) -> ServiceObjTy::Output,
P: DiscoverableProtocolMarker,
FidlServiceServerConnector<F, P, ServiceObjTy::Output>: Into<ServiceObjTy>,
pub fn add_service_connector<F, P>(&mut self, service: F) -> &mut Selfwhere
F: FnMut(ServerEnd<P>) -> ServiceObjTy::Output,
P: DiscoverableProtocolMarker,
FidlServiceServerConnector<F, P, ServiceObjTy::Output>: Into<ServiceObjTy>,
Adds a service connector to the directory.
let mut fs = ServiceFs::new_local();
fs
.add_service_connector(|server_end: ServerEnd<EchoMarker>| {
connect_channel_to_protocol::<EchoMarker>(
server_end.into_channel(),
)
})
.add_service_connector(|server_end: ServerEnd<CustomMarker>| {
connect_channel_to_protocol::<CustomMarker>(
server_end.into_channel(),
)
})
.take_and_serve_directory_handle()?;
The FIDL service will be hosted at the name provided by the
[Discoverable]
annotation in the FIDL source.
Sourcepub fn add_service_at(
&mut self,
path: impl Into<String>,
service: impl Into<ServiceObjTy>,
) -> &mut Self
pub fn add_service_at( &mut self, path: impl Into<String>, service: impl Into<ServiceObjTy>, ) -> &mut Self
Adds a service to the directory at the given path.
The path must be a single component containing no /
characters.
Panics if any node has already been added at the given path.
Sourcepub fn add_fidl_service<F, RS>(&mut self, service: F) -> &mut Selfwhere
F: FnMut(RS) -> ServiceObjTy::Output,
RS: RequestStream,
RS::Protocol: DiscoverableProtocolMarker,
FidlService<F, RS, ServiceObjTy::Output>: Into<ServiceObjTy>,
pub fn add_fidl_service<F, RS>(&mut self, service: F) -> &mut Selfwhere
F: FnMut(RS) -> ServiceObjTy::Output,
RS: RequestStream,
RS::Protocol: DiscoverableProtocolMarker,
FidlService<F, RS, ServiceObjTy::Output>: Into<ServiceObjTy>,
Adds a FIDL service to the directory.
service
is a closure that accepts a RequestStream
.
Each service being served must return an instance of the same type
(ServiceObjTy::Output
). This is necessary in order to multiplex
multiple services over the same dispatcher code. The typical way
to do this is to create an enum
with variants for each service
you want to serve.
enum MyServices {
EchoServer(EchoRequestStream),
CustomServer(CustomRequestStream),
// ...
}
The constructor for a variant of the MyServices
enum can be passed
as the service
parameter.
let mut fs = ServiceFs::new_local();
fs
.add_fidl_service(MyServices::EchoServer)
.add_fidl_service(MyServices::CustomServer)
.take_and_serve_directory_handle()?;
ServiceFs
can now be treated as a Stream
of type MyServices
.
const MAX_CONCURRENT: usize = 10_000;
fs.for_each_concurrent(MAX_CONCURRENT, |request: MyServices| {
match request {
MyServices::EchoServer(request) => handle_echo(request),
MyServices::CustomServer(request) => handle_custom(request),
}
}).await;
The FIDL service will be hosted at the name provided by the
[Discoverable]
annotation in the FIDL source.
Sourcepub fn add_fidl_service_at<F, RS>(
&mut self,
path: impl Into<String>,
service: F,
) -> &mut Selfwhere
F: FnMut(RS) -> ServiceObjTy::Output,
RS: RequestStream,
RS::Protocol: DiscoverableProtocolMarker,
FidlService<F, RS, ServiceObjTy::Output>: Into<ServiceObjTy>,
pub fn add_fidl_service_at<F, RS>(
&mut self,
path: impl Into<String>,
service: F,
) -> &mut Selfwhere
F: FnMut(RS) -> ServiceObjTy::Output,
RS: RequestStream,
RS::Protocol: DiscoverableProtocolMarker,
FidlService<F, RS, ServiceObjTy::Output>: Into<ServiceObjTy>,
Adds a FIDL service to the directory at the given path.
The path must be a single component containing no /
characters.
See add_fidl_service
for details.
Sourcepub fn add_fidl_service_instance<F, SR>(
&mut self,
instance: impl Into<String>,
service: F,
) -> &mut Selfwhere
F: Fn(SR) -> ServiceObjTy::Output + Clone,
SR: ServiceRequest,
FidlServiceMember<F, SR, ServiceObjTy::Output>: Into<ServiceObjTy>,
pub fn add_fidl_service_instance<F, SR>(
&mut self,
instance: impl Into<String>,
service: F,
) -> &mut Selfwhere
F: Fn(SR) -> ServiceObjTy::Output + Clone,
SR: ServiceRequest,
FidlServiceMember<F, SR, ServiceObjTy::Output>: Into<ServiceObjTy>,
Adds a named instance of a FIDL service to the directory.
The FIDL service will be hosted at [SERVICE_NAME]/[instance]/
where SERVICE_NAME
is
constructed from the FIDL library path and the name of the FIDL service.
The instance
must be a single component containing no /
characters.
§Example
For the following FIDL definition,
library lib.foo;
service Bar {
...
}
The SERVICE_NAME
of FIDL Service Bar
would be lib.foo.Bar
.
Sourcepub fn add_fidl_service_instance_at<F, SR>(
&mut self,
path: impl Into<String>,
instance: impl Into<String>,
service: F,
) -> &mut Selfwhere
F: Fn(SR) -> ServiceObjTy::Output + Clone,
SR: ServiceRequest,
FidlServiceMember<F, SR, ServiceObjTy::Output>: Into<ServiceObjTy>,
pub fn add_fidl_service_instance_at<F, SR>(
&mut self,
path: impl Into<String>,
instance: impl Into<String>,
service: F,
) -> &mut Selfwhere
F: Fn(SR) -> ServiceObjTy::Output + Clone,
SR: ServiceRequest,
FidlServiceMember<F, SR, ServiceObjTy::Output>: Into<ServiceObjTy>,
Adds a named instance of a FIDL service to the directory at the given path.
The FIDL service will be hosted at [path]/[instance]/
.
The path
and instance
must be single components containing no /
characters.
Sourcepub fn add_proxy_service<P: DiscoverableProtocolMarker, O>(
&mut self,
) -> &mut Selfwhere
ServiceObjTy: From<Proxy<P, O>> + ServiceObjTrait<Output = O>,
pub fn add_proxy_service<P: DiscoverableProtocolMarker, O>(
&mut self,
) -> &mut Selfwhere
ServiceObjTy: From<Proxy<P, O>> + ServiceObjTrait<Output = O>,
Adds a service that proxies requests to the current environment.
Sourcepub fn add_proxy_service_to<P: DiscoverableProtocolMarker, O>(
&mut self,
directory_request: Arc<ClientEnd<DirectoryMarker>>,
) -> &mut Selfwhere
ServiceObjTy: From<ProxyTo<P, O>> + ServiceObjTrait<Output = O>,
pub fn add_proxy_service_to<P: DiscoverableProtocolMarker, O>(
&mut self,
directory_request: Arc<ClientEnd<DirectoryMarker>>,
) -> &mut Selfwhere
ServiceObjTy: From<ProxyTo<P, O>> + ServiceObjTrait<Output = O>,
Adds a service that proxies requests to the given component.
Sourcepub fn add_vmo_file_at(
&mut self,
path: impl Into<String>,
vmo: Vmo,
) -> &mut Self
pub fn add_vmo_file_at( &mut self, path: impl Into<String>, vmo: Vmo, ) -> &mut Self
Adds a VMO file to the directory at the given path.
The path must be a single component containing no /
characters. The vmo should have
content size set as required.
Panics if any node has already been added at the given path.
Sourcepub fn add_entry_at(
&mut self,
path: impl Into<String>,
entry: Arc<dyn DirectoryEntry>,
) -> &mut Self
pub fn add_entry_at( &mut self, path: impl Into<String>, entry: Arc<dyn DirectoryEntry>, ) -> &mut Self
Adds an entry to the directory at the given path.
The path must be a single component.
The path must be a valid fuchsia.io
[Name
].
Panics if any node has already been added at the given path.
Sourcepub fn dir(&mut self, path: impl Into<String>) -> ServiceFsDir<'_, ServiceObjTy>
pub fn dir(&mut self, path: impl Into<String>) -> ServiceFsDir<'_, ServiceObjTy>
Returns a reference to the subdirectory at the given path, creating one if none exists.
The path must be a single component.
The path must be a valid fuchsia.io
[Name
].
Panics if a service has already been added at the given path.
Sourcepub fn add_remote(
&mut self,
name: impl Into<String>,
proxy: DirectoryProxy,
) -> &mut Self
pub fn add_remote( &mut self, name: impl Into<String>, proxy: DirectoryProxy, ) -> &mut Self
Adds a new remote directory served over the given DirectoryProxy.
The name must be a valid fuchsia.io
[Name
].
Sourcepub fn create_protocol_connector<O>(
&mut self,
) -> Result<ProtocolConnector, Error>where
ServiceObjTy: ServiceObjTrait<Output = O>,
pub fn create_protocol_connector<O>(
&mut self,
) -> Result<ProtocolConnector, Error>where
ServiceObjTy: ServiceObjTrait<Output = O>,
Creates a protocol connector that can access the capabilities exposed by this ServiceFs.
Source§impl<ServiceObjTy: ServiceObjTrait> ServiceFs<ServiceObjTy>
impl<ServiceObjTy: ServiceObjTrait> ServiceFs<ServiceObjTy>
Sourcepub fn take_and_serve_directory_handle(&mut self) -> Result<&mut Self, Error>
pub fn take_and_serve_directory_handle(&mut self) -> Result<&mut Self, Error>
Removes the DirectoryRequest
startup handle for the current
component and adds connects it to this ServiceFs
as a client.
Multiple calls to this function from the same component will
result in Err(MissingStartupHandle)
.
Sourcepub fn serve_connection(
&mut self,
chan: ServerEnd<DirectoryMarker>,
) -> Result<&mut Self, Error>
pub fn serve_connection( &mut self, chan: ServerEnd<DirectoryMarker>, ) -> Result<&mut Self, Error>
Add a channel to serve this ServiceFs
filesystem on. The ServiceFs
will continue to be provided over previously added channels, including
the one added if take_and_serve_directory_handle
was called.
Sourcepub fn until_stalled(
self,
debounce_interval: MonotonicDuration,
) -> StallableServiceFs<ServiceObjTy>
pub fn until_stalled( self, debounce_interval: MonotonicDuration, ) -> StallableServiceFs<ServiceObjTy>
TODO(https://fxbug.dev/326626515): this is an experimental method to run a FIDL directory connection until stalled, with the purpose to cleanly stop a component. We’ll expect to revisit how this works to generalize to all connections later. Try not to use this function for other purposes.
Normally the ServiceFs
stream will block until all connections are closed.
In order to escrow the outgoing directory server endpoint, you may use this
function to get a StallableServiceFs
that detects when no new requests
hit the outgoing directory for debounce_interval
, and all hosted protocols
and other VFS connections to finish, then yield back the outgoing directory handle.
The ServiceFs
stream yields [ServiceObjTy::Output
], which could be an enum
of FIDL connection requests in a typical component. By contrast, StallableServiceFs
yields an enum of either the request, or the unbound outgoing directory endpoint,
allowing you to escrow it back to component_manager
before exiting the component.
Trait Implementations§
Source§impl<ServiceObjTy: ServiceObjTrait> Stream for ServiceFs<ServiceObjTy>
impl<ServiceObjTy: ServiceObjTrait> Stream for ServiceFs<ServiceObjTy>
Source§type Item = <ServiceObjTy as ServiceObjTrait>::Output
type Item = <ServiceObjTy as ServiceObjTrait>::Output
impl<'pin, ServiceObjTy: ServiceObjTrait> Unpin for ServiceFs<ServiceObjTy>where
__ServiceFs<'pin, ServiceObjTy>: Unpin,
Auto Trait Implementations§
impl<ServiceObjTy> Freeze for ServiceFs<ServiceObjTy>
impl<ServiceObjTy> !RefUnwindSafe for ServiceFs<ServiceObjTy>
impl<ServiceObjTy> Send for ServiceFs<ServiceObjTy>where
ServiceObjTy: Send,
impl<ServiceObjTy> !Sync for ServiceFs<ServiceObjTy>
impl<ServiceObjTy> !UnwindSafe for ServiceFs<ServiceObjTy>
Blanket Implementations§
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
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> StreamExt for Twhere
T: Stream + ?Sized,
impl<T> StreamExt for Twhere
T: Stream + ?Sized,
§fn next(&mut self) -> Next<'_, Self>where
Self: Unpin,
fn next(&mut self) -> Next<'_, Self>where
Self: Unpin,
§fn into_future(self) -> StreamFuture<Self>
fn into_future(self) -> StreamFuture<Self>
§fn map<T, F>(self, f: F) -> Map<Self, F>
fn map<T, F>(self, f: F) -> Map<Self, F>
§fn enumerate(self) -> Enumerate<Self>where
Self: Sized,
fn enumerate(self) -> Enumerate<Self>where
Self: Sized,
§fn filter<Fut, F>(self, f: F) -> Filter<Self, Fut, F>
fn filter<Fut, F>(self, f: F) -> Filter<Self, Fut, F>
§fn filter_map<Fut, T, F>(self, f: F) -> FilterMap<Self, Fut, F>
fn filter_map<Fut, T, F>(self, f: F) -> FilterMap<Self, Fut, F>
§fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F>
fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F>
§fn collect<C>(self) -> Collect<Self, C>
fn collect<C>(self) -> Collect<Self, C>
§fn unzip<A, B, FromA, FromB>(self) -> Unzip<Self, FromA, FromB>
fn unzip<A, B, FromA, FromB>(self) -> Unzip<Self, FromA, FromB>
§fn concat(self) -> Concat<Self>
fn concat(self) -> Concat<Self>
§fn count(self) -> Count<Self>where
Self: Sized,
fn count(self) -> Count<Self>where
Self: Sized,
§fn fold<T, Fut, F>(self, init: T, f: F) -> Fold<Self, Fut, T, F>
fn fold<T, Fut, F>(self, init: T, f: F) -> Fold<Self, Fut, T, F>
§fn any<Fut, F>(self, f: F) -> Any<Self, Fut, F>
fn any<Fut, F>(self, f: F) -> Any<Self, Fut, F>
true
if any element in stream satisfied a predicate. Read more§fn all<Fut, F>(self, f: F) -> All<Self, Fut, F>
fn all<Fut, F>(self, f: F) -> All<Self, Fut, F>
true
if all element in stream satisfied a predicate. Read more§fn flatten(self) -> Flatten<Self>where
Self::Item: Stream,
Self: Sized,
fn flatten(self) -> Flatten<Self>where
Self::Item: Stream,
Self: Sized,
§fn flatten_unordered(
self,
limit: impl Into<Option<usize>>,
) -> FlattenUnorderedWithFlowController<Self, ()>
fn flatten_unordered( self, limit: impl Into<Option<usize>>, ) -> FlattenUnorderedWithFlowController<Self, ()>
§fn flat_map_unordered<U, F>(
self,
limit: impl Into<Option<usize>>,
f: F,
) -> FlatMapUnordered<Self, U, F>
fn flat_map_unordered<U, F>( self, limit: impl Into<Option<usize>>, f: F, ) -> FlatMapUnordered<Self, U, F>
StreamExt::map
] but flattens nested Stream
s
and polls them concurrently, yielding items in any order, as they made
available. Read more§fn scan<S, B, Fut, F>(self, initial_state: S, f: F) -> Scan<Self, S, Fut, F>
fn scan<S, B, Fut, F>(self, initial_state: S, f: F) -> Scan<Self, S, Fut, F>
StreamExt::fold
] that holds internal state
and produces a new stream. Read more§fn skip_while<Fut, F>(self, f: F) -> SkipWhile<Self, Fut, F>
fn skip_while<Fut, F>(self, f: F) -> SkipWhile<Self, Fut, F>
true
. Read more§fn take_while<Fut, F>(self, f: F) -> TakeWhile<Self, Fut, F>
fn take_while<Fut, F>(self, f: F) -> TakeWhile<Self, Fut, F>
true
. Read more§fn take_until<Fut>(self, fut: Fut) -> TakeUntil<Self, Fut>
fn take_until<Fut>(self, fut: Fut) -> TakeUntil<Self, Fut>
§fn for_each<Fut, F>(self, f: F) -> ForEach<Self, Fut, F>
fn for_each<Fut, F>(self, f: F) -> ForEach<Self, Fut, F>
§fn for_each_concurrent<Fut, F>(
self,
limit: impl Into<Option<usize>>,
f: F,
) -> ForEachConcurrent<Self, Fut, F>
fn for_each_concurrent<Fut, F>( self, limit: impl Into<Option<usize>>, f: F, ) -> ForEachConcurrent<Self, Fut, F>
§fn take(self, n: usize) -> Take<Self>where
Self: Sized,
fn take(self, n: usize) -> Take<Self>where
Self: Sized,
n
items of the underlying stream. Read more§fn skip(self, n: usize) -> Skip<Self>where
Self: Sized,
fn skip(self, n: usize) -> Skip<Self>where
Self: Sized,
n
items of the underlying stream. Read more§fn catch_unwind(self) -> CatchUnwind<Self>where
Self: Sized + UnwindSafe,
fn catch_unwind(self) -> CatchUnwind<Self>where
Self: Sized + UnwindSafe,
§fn boxed<'a>(self) -> Pin<Box<dyn Stream<Item = Self::Item> + Send + 'a>>
fn boxed<'a>(self) -> Pin<Box<dyn Stream<Item = Self::Item> + Send + 'a>>
§fn boxed_local<'a>(self) -> Pin<Box<dyn Stream<Item = Self::Item> + 'a>>where
Self: Sized + 'a,
fn boxed_local<'a>(self) -> Pin<Box<dyn Stream<Item = Self::Item> + 'a>>where
Self: Sized + 'a,
§fn buffered(self, n: usize) -> Buffered<Self>
fn buffered(self, n: usize) -> Buffered<Self>
§fn buffer_unordered(self, n: usize) -> BufferUnordered<Self>
fn buffer_unordered(self, n: usize) -> BufferUnordered<Self>
§fn zip<St>(self, other: St) -> Zip<Self, St>where
St: Stream,
Self: Sized,
fn zip<St>(self, other: St) -> Zip<Self, St>where
St: Stream,
Self: Sized,
§fn chain<St>(self, other: St) -> Chain<Self, St>where
St: Stream<Item = Self::Item>,
Self: Sized,
fn chain<St>(self, other: St) -> Chain<Self, St>where
St: Stream<Item = Self::Item>,
Self: Sized,
§fn peekable(self) -> Peekable<Self>where
Self: Sized,
fn peekable(self) -> Peekable<Self>where
Self: Sized,
peek
method. Read more§fn chunks(self, capacity: usize) -> Chunks<Self>where
Self: Sized,
fn chunks(self, capacity: usize) -> Chunks<Self>where
Self: Sized,
§fn ready_chunks(self, capacity: usize) -> ReadyChunks<Self>where
Self: Sized,
fn ready_chunks(self, capacity: usize) -> ReadyChunks<Self>where
Self: Sized,
§fn forward<S>(self, sink: S) -> Forward<Self, S>where
S: Sink<Self::Ok, Error = Self::Error>,
Self: Sized + TryStream,
fn forward<S>(self, sink: S) -> Forward<Self, S>where
S: Sink<Self::Ok, Error = Self::Error>,
Self: Sized + TryStream,
§fn inspect<F>(self, f: F) -> Inspect<Self, F>
fn inspect<F>(self, f: F) -> Inspect<Self, F>
§fn left_stream<B>(self) -> Either<Self, B>where
B: Stream<Item = Self::Item>,
Self: Sized,
fn left_stream<B>(self) -> Either<Self, B>where
B: Stream<Item = Self::Item>,
Self: Sized,
§fn right_stream<B>(self) -> Either<B, Self>where
B: Stream<Item = Self::Item>,
Self: Sized,
fn right_stream<B>(self) -> Either<B, Self>where
B: Stream<Item = Self::Item>,
Self: Sized,
§fn poll_next_unpin(&mut self, cx: &mut Context<'_>) -> Poll<Option<Self::Item>>where
Self: Unpin,
fn poll_next_unpin(&mut self, cx: &mut Context<'_>) -> Poll<Option<Self::Item>>where
Self: Unpin,
Stream::poll_next
] on Unpin
stream types.§fn select_next_some(&mut self) -> SelectNextSome<'_, Self>where
Self: Unpin + FusedStream,
fn select_next_some(&mut self) -> SelectNextSome<'_, Self>where
Self: Unpin + FusedStream,
§impl<S, T, E> TryStream for S
impl<S, T, E> TryStream for S
§impl<S> TryStreamExt for Swhere
S: TryStream + ?Sized,
impl<S> TryStreamExt for Swhere
S: TryStream + ?Sized,
§fn err_into<E>(self) -> ErrInto<Self, E>
fn err_into<E>(self) -> ErrInto<Self, E>
§fn map_ok<T, F>(self, f: F) -> MapOk<Self, F>
fn map_ok<T, F>(self, f: F) -> MapOk<Self, F>
§fn map_err<E, F>(self, f: F) -> MapErr<Self, F>
fn map_err<E, F>(self, f: F) -> MapErr<Self, F>
§fn and_then<Fut, F>(self, f: F) -> AndThen<Self, Fut, F>
fn and_then<Fut, F>(self, f: F) -> AndThen<Self, Fut, F>
f
. Read more§fn or_else<Fut, F>(self, f: F) -> OrElse<Self, Fut, F>
fn or_else<Fut, F>(self, f: F) -> OrElse<Self, Fut, F>
f
. Read more§fn inspect_ok<F>(self, f: F) -> InspectOk<Self, F>
fn inspect_ok<F>(self, f: F) -> InspectOk<Self, F>
§fn inspect_err<F>(self, f: F) -> InspectErr<Self, F>
fn inspect_err<F>(self, f: F) -> InspectErr<Self, F>
§fn into_stream(self) -> IntoStream<Self>where
Self: Sized,
fn into_stream(self) -> IntoStream<Self>where
Self: Sized,
§fn try_next(&mut self) -> TryNext<'_, Self>where
Self: Unpin,
fn try_next(&mut self) -> TryNext<'_, Self>where
Self: Unpin,
§fn try_for_each<Fut, F>(self, f: F) -> TryForEach<Self, Fut, F>
fn try_for_each<Fut, F>(self, f: F) -> TryForEach<Self, Fut, F>
§fn try_skip_while<Fut, F>(self, f: F) -> TrySkipWhile<Self, Fut, F>
fn try_skip_while<Fut, F>(self, f: F) -> TrySkipWhile<Self, Fut, F>
true
. Read more§fn try_take_while<Fut, F>(self, f: F) -> TryTakeWhile<Self, Fut, F>
fn try_take_while<Fut, F>(self, f: F) -> TryTakeWhile<Self, Fut, F>
true
. Read more§fn try_for_each_concurrent<Fut, F>(
self,
limit: impl Into<Option<usize>>,
f: F,
) -> TryForEachConcurrent<Self, Fut, F>
fn try_for_each_concurrent<Fut, F>( self, limit: impl Into<Option<usize>>, f: F, ) -> TryForEachConcurrent<Self, Fut, F>
§fn try_collect<C>(self) -> TryCollect<Self, C>
fn try_collect<C>(self) -> TryCollect<Self, C>
§fn try_chunks(self, capacity: usize) -> TryChunks<Self>where
Self: Sized,
fn try_chunks(self, capacity: usize) -> TryChunks<Self>where
Self: Sized,
§fn try_ready_chunks(self, capacity: usize) -> TryReadyChunks<Self>where
Self: Sized,
fn try_ready_chunks(self, capacity: usize) -> TryReadyChunks<Self>where
Self: Sized,
§fn try_filter<Fut, F>(self, f: F) -> TryFilter<Self, Fut, F>
fn try_filter<Fut, F>(self, f: F) -> TryFilter<Self, Fut, F>
§fn try_filter_map<Fut, F, T>(self, f: F) -> TryFilterMap<Self, Fut, F>
fn try_filter_map<Fut, F, T>(self, f: F) -> TryFilterMap<Self, Fut, F>
§fn try_flatten_unordered(
self,
limit: impl Into<Option<usize>>,
) -> TryFlattenUnordered<Self>
fn try_flatten_unordered( self, limit: impl Into<Option<usize>>, ) -> TryFlattenUnordered<Self>
§fn try_flatten(self) -> TryFlatten<Self>
fn try_flatten(self) -> TryFlatten<Self>
§fn try_fold<T, Fut, F>(self, init: T, f: F) -> TryFold<Self, Fut, T, F>
fn try_fold<T, Fut, F>(self, init: T, f: F) -> TryFold<Self, Fut, T, F>
§fn try_concat(self) -> TryConcat<Self>
fn try_concat(self) -> TryConcat<Self>
§fn try_buffer_unordered(self, n: usize) -> TryBufferUnordered<Self>where
Self::Ok: TryFuture<Error = Self::Error>,
Self: Sized,
fn try_buffer_unordered(self, n: usize) -> TryBufferUnordered<Self>where
Self::Ok: TryFuture<Error = Self::Error>,
Self: Sized,
§fn try_buffered(self, n: usize) -> TryBuffered<Self>where
Self::Ok: TryFuture<Error = Self::Error>,
Self: Sized,
fn try_buffered(self, n: usize) -> TryBuffered<Self>where
Self::Ok: TryFuture<Error = Self::Error>,
Self: Sized,
§fn try_poll_next_unpin(
&mut self,
cx: &mut Context<'_>,
) -> Poll<Option<Result<Self::Ok, Self::Error>>>where
Self: Unpin,
fn try_poll_next_unpin(
&mut self,
cx: &mut Context<'_>,
) -> Poll<Option<Result<Self::Ok, Self::Error>>>where
Self: Unpin,
TryStream::try_poll_next
] on Unpin
stream types.§fn into_async_read(self) -> IntoAsyncRead<Self>
fn into_async_read(self) -> IntoAsyncRead<Self>
AsyncBufRead
. Read more§fn try_all<Fut, F>(self, f: F) -> TryAll<Self, Fut, F>
fn try_all<Fut, F>(self, f: F) -> TryAll<Self, Fut, F>
Err
is encountered or if an Ok
item is found
that does not satisfy the predicate. Read more