use crate::{ReadApi, RwApi, WriteApi};
impl<T, R> RwApi for T
where
T: ReadApi<Target=R> + WriteApi<Target=R>
{
type ReadGuard<'a> = <Self as ReadApi>::ReadGuard<'a>
where Self: 'a;
type WriteGuard<'a> = <Self as WriteApi>::WriteGuard<'a>
where Self: 'a;
#[inline]
fn read(&self) -> Self::ReadGuard<'_> {
ReadApi::read(self)
}
#[inline]
fn write(&mut self) -> Self::WriteGuard<'_> {
WriteApi::write(self)
}
}