vfs::test_utils::node

Trait NodeProxyApi

Source
pub trait NodeProxyApi {
    // Required method
    fn clone(
        &self,
        flags: OpenFlags,
        server_end: ServerEnd<NodeMarker>,
    ) -> Result<(), Error>;
}
Expand description

This trait repeats parts of the NodeProxy trait, and is implemented for NodeProxy, FileProxy, and DirectoryProxy, which all share the same API. FIDL currently does not expose the API inheritance, so with this trait we have a workaround. As soon as FIDL will export the necessary information we should remove this trait, as it is just a workaround. The downsides is that this mapping needs to be manually updated, and that it is not something all the users of FIDL of NodeProxy would be familiar with - unnecessary complexity.

Add methods to this trait when they are necessary to reduce the maintenance effort.

Required Methods§

Source

fn clone( &self, flags: OpenFlags, server_end: ServerEnd<NodeMarker>, ) -> Result<(), Error>

Implementations on Foreign Types§

Source§

impl NodeProxyApi for DirectoryProxy

Source§

fn clone( &self, flags: OpenFlags, server_end: ServerEnd<NodeMarker>, ) -> Result<(), Error>

Source§

impl NodeProxyApi for FileProxy

Source§

fn clone( &self, flags: OpenFlags, server_end: ServerEnd<NodeMarker>, ) -> Result<(), Error>

Source§

impl NodeProxyApi for NodeProxy

Source§

fn clone( &self, flags: OpenFlags, server_end: ServerEnd<NodeMarker>, ) -> Result<(), Error>

Implementors§