pub enum TwoWays<ONE, TWO> {
One(ONE),
Two(TWO),
}Expand description
TwoWays is used to implement traits that based on two ways.
Users can wrap two different trait types together.
Variants§
Trait Implementations§
Source§impl<ONE: Copy, TWO: Copy> Copy for TwoWays<ONE, TWO>
impl<ONE: Copy, TWO: Copy> Copy for TwoWays<ONE, TWO>
Source§impl<ONE: ReadStream, TWO: ReadStream> ReadStream for TwoWays<ONE, TWO>
impl<ONE: ReadStream, TWO: ReadStream> ReadStream for TwoWays<ONE, TWO>
Source§impl<ONE: Write, TWO: Write> Write for TwoWays<ONE, TWO>
impl<ONE: Write, TWO: Write> Write for TwoWays<ONE, TWO>
Source§async fn write(&mut self, bs: Buffer) -> Result<()>
async fn write(&mut self, bs: Buffer) -> Result<()>
Write the entire buffer into the writer. Read more
Source§async fn copy_from(
&mut self,
path: &str,
args: OpRead,
range: BytesRange,
) -> Result<()>
async fn copy_from( &mut self, path: &str, args: OpRead, range: BytesRange, ) -> Result<()>
Copy one absolute bounded source range into this writer. Read more
Auto Trait Implementations§
impl<ONE, TWO> Freeze for TwoWays<ONE, TWO>
impl<ONE, TWO> RefUnwindSafe for TwoWays<ONE, TWO>where
ONE: RefUnwindSafe,
TWO: RefUnwindSafe,
impl<ONE, TWO> Send for TwoWays<ONE, TWO>
impl<ONE, TWO> Sync for TwoWays<ONE, TWO>
impl<ONE, TWO> Unpin for TwoWays<ONE, TWO>
impl<ONE, TWO> UnsafeUnpin for TwoWays<ONE, TWO>where
ONE: UnsafeUnpin,
TWO: UnsafeUnpin,
impl<ONE, TWO> UnwindSafe for TwoWays<ONE, TWO>where
ONE: UnwindSafe,
TWO: UnwindSafe,
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
Source§impl<T> CopyDyn for T
impl<T> CopyDyn for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
impl<T> MaybeSend for Twhere
T: Send,
impl<T> MaybeSend for Twhere
T: Send,
Source§impl<T> ReadStreamDyn for Twhere
T: ReadStream + ?Sized,
impl<T> ReadStreamDyn for Twhere
T: ReadStream + ?Sized,
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
Source§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Source§impl<T> WriteDyn for T
impl<T> WriteDyn for T
Source§fn write_dyn(
&mut self,
bs: Buffer,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + '_>>
fn write_dyn( &mut self, bs: Buffer, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + '_>>
The dyn version of
Write::write.Source§fn copy_from_dyn<'a>(
&'a mut self,
path: &'a str,
args: OpRead,
range: BytesRange,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'a>>
fn copy_from_dyn<'a>( &'a mut self, path: &'a str, args: OpRead, range: BytesRange, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'a>>
The dyn version of
Write::copy_from.