Refactor Host and related traits into a new traits module

This is a draft implementation of #294. I'll leave this open for
feedback and potentially better trait naming suggestions or better
solutions in general!

cc @ishitatsuyuki
This commit is contained in:
mitchmindtree 2019-06-28 23:42:07 +02:00
parent 36dee482bd
commit 5e4f384992
12 changed files with 225 additions and 219 deletions

View file

@ -3,19 +3,16 @@ extern crate winapi;
use BackendSpecificError;
use BuildStreamError;
use DefaultFormatError;
use Device as DeviceTrait;
use DeviceNameError;
use DevicesError;
use EventLoop as EventLoopTrait;
use Format;
use Host as HostTrait;
use PlayStreamError;
use PauseStreamError;
use StreamDataResult;
use StreamId as StreamIdTrait;
use SupportedFormatsError;
use self::winapi::um::winnt::HRESULT;
use std::io::Error as IoError;
use traits::{DeviceTrait, EventLoopTrait, HostTrait, StreamIdTrait};
pub use self::device::{Device, Devices, SupportedInputFormats, SupportedOutputFormats, default_input_device, default_output_device};
pub use self::stream::{EventLoop, StreamId};