aboutsummaryrefslogblamecommitdiffstats
path: root/src/platform/uapi.rs
blob: 8259f6780a808c0d558d57dbcbf9f1503602a8b9 (plain) (tree)
1
2
3
4
5
6
7
8






                              
                                                           







                                                           
use std::error::Error;
use std::io::{Read, Write};

pub trait BindUAPI {
    type Stream: Read + Write;
    type Error: Error;

    fn connect(&self) -> Result<Self::Stream, Self::Error>;
}

pub trait PlatformUAPI {
    type Error: Error;
    type Bind: BindUAPI;

    fn bind(name: &str) -> Result<Self::Bind, Self::Error>;
}