aboutsummaryrefslogblamecommitdiffstats
path: root/src/platform/dummy/endpoint.rs
blob: f5fc32c407252525a43aff7f40b25e30a6553384 (plain) (tree)
1
2
                         
 





















                                                    
use std::net::SocketAddr;

use super::super::Endpoint;

#[derive(Clone, Copy)]
pub struct UnitEndpoint {}

impl Endpoint for UnitEndpoint {
    fn from_address(_: SocketAddr) -> UnitEndpoint {
        UnitEndpoint {}
    }

    fn into_address(&self) -> SocketAddr {
        "127.0.0.1:8080".parse().unwrap()
    }

    fn clear_src(&mut self) {}
}

impl UnitEndpoint {
    pub fn new() -> UnitEndpoint {
        UnitEndpoint {}
    }
}