Skip to main content

call_fidl_and_await_close

Function call_fidl_and_await_close 

Source
pub fn call_fidl_and_await_close<P, M>(method: M, proxy: &P)
where P: SynchronousProxy, M: FnOnce(&P) -> Result<(), Error>,
Expand description

Invokes the specified one-way method on the proxy and waits until the proxy’s underlying channel has been closed by the peer.

This is used in close() implementations when the FileOps wraps a FIDL resource that provides a one-way API to request teardown, and acknowledges completion of teardown by closing the FIDL channel, to ensure that the close() call does not return until the FIDL server has actually processed the teardown request.