Struct webrtc_util::vnet::router::Router
source · pub struct Router { /* private fields */ }
Implementations§
source§impl Router
impl Router
pub fn new(config: RouterConfig) -> Result<Self>
pub fn start(&mut self) -> Pin<Box<dyn Future<Output = Result<()>>>>
pub fn stop(&mut self) -> Pin<Box<dyn Future<Output = Result<()>>>>
pub async fn add_router(&mut self, child: Arc<Mutex<Router>>) -> Result<()>
pub async fn add_net( &mut self, nic: Arc<Mutex<dyn Nic + Send + Sync>> ) -> Result<()>
pub async fn add_host( &mut self, host_name: String, ip_addr: String ) -> Result<()>
pub async fn add_chunk_filter(&self, filter: ChunkFilterFn)
Trait Implementations§
source§impl Nic for Router
impl Nic for Router
fn get_interface<'life0, 'life1, 'async_trait>(
&'life0 self,
ifc_name: &'life1 str
) -> Pin<Box<dyn Future<Output = Option<Interface>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn add_addrs_to_interface<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
ifc_name: &'life1 str,
addrs: &'life2 [IpNet]
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn on_inbound_chunk<'life0, 'async_trait>(
&'life0 self,
c: Box<dyn Chunk + Send + Sync>
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_static_ips<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Vec<IpAddr>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_router<'life0, 'async_trait>(
&'life0 self,
parent: Arc<Mutex<Router>>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl !RefUnwindSafe for Router
impl Send for Router
impl Sync for Router
impl Unpin for Router
impl !UnwindSafe for Router
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
Mutably borrows from an owned value. Read more