netstack_testing_common::realms

Trait TestRealmExt

Source
pub trait TestRealmExt {
    // Required methods
    fn loopback_properties<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Properties<AllInterest>>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn interface_control(&self, id: u64) -> Result<Control>;
}
Expand description

Helpers for netemul::TestRealm.

Required Methods§

Source

fn loopback_properties<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Option<Properties<AllInterest>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns the properties of the loopback interface, or None if there is no loopback interface.

Source

fn interface_control(&self, id: u64) -> Result<Control>

Get a fuchsia.net.interfaces.admin/Control client proxy for the interface identified by [id] via fuchsia.net.root.

Note that one should prefer to operate on a TestInterface if it is available; but this method exists in order to obtain a Control channel for interfaces such as loopback.

Implementations on Foreign Types§

Source§

impl TestRealmExt for TestRealm<'_>

Source§

fn loopback_properties<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Option<Properties<AllInterest>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn interface_control(&self, id: u64) -> Result<Control>

Implementors§