fn channel<Tx, Rx>(
        mut make: impl FnMut() -> (Tx, Rx),
    ) -> (Chan<Self, Tx, Rx>, Chan<Self::Dual, Tx, Rx>)
    where
        <Self as Session>::Dual: Scoped + Actionable + HasDual,
        Tx: Send + 'static,
        Rx: Send + 'static,
    {
        let (tx0, rx0) = make();
        let (tx1, rx1) = make();
        (Self::wrap(tx0, rx1), <Self::Dual>::wrap(tx1, rx0))
    }
/// Given a closure which generates a uni-directional underlying transport channel, create a
/// pair of dual [`Chan`]s which communicate over the transport channels resulting from these
/// closures.
///
/// By internally wiring together the two directional channels, this function assures that
/// communications over the channels actually follow the session specified.
///
/// # Examples
///
/// ```
/// use dialectic::prelude::*;
/// use dialectic_tokio_mpsc as mpsc;
///
/// # #[tokio::main]
/// # async fn main() {
/// let (c1, c2) = <Session! { /* ... */ }>::channel(mpsc::unbounded_channel);
/// # }
/// ```
Given a closure which generates a uni-directional underlying transport channel, create a
pair of dual [`Chan`]s which communicate over the transport channels resulting from these
closures.

By internally wiring together the two directional channels, this function assures that
communications over the channels actually follow the session specified.
Given a closure which generates a uni - directional underlying transport channel create a pair of dual [ ` Chan ` ] s which communicate over the transport channels resulting from these closures . By internally wiring together the two directional channels this function assures that communications over the channels actually follow the session specified .
fn channel<Tx, Rx>(
        mut make: impl FnMut() -> (Tx, Rx),
    ) -> (Chan<Self, Tx, Rx>, Chan<Self::Dual, Tx, Rx>)
    where
        <Self as Session>::Dual: Scoped + Actionable + HasDual,
        Tx: Send + 'static,
        Rx: Send + 'static,
    {
        let (tx0, rx0) = make();
        let (tx1, rx1) = make();
        (Self::wrap(tx0, rx1), <Self::Dual>::wrap(tx1, rx0))
    }
fn channel < Tx , Rx > ( mut make : impl FnMut ( ) -> ( Tx , Rx ) , ) -> ( Chan < Self , Tx , Rx > , Chan < Self :: Dual , Tx , Rx > ) where < Self as Session > :: Dual : Scoped + Actionable + HasDual , Tx : Send + ' static , Rx : Send + ' static , { let ( tx0 , rx0 ) = make ( ) ; let ( tx1 , rx1 ) = make ( ) ; ( Self :: wrap ( tx0 , rx1 ) , < Self :: Dual > :: wrap ( tx1 , rx0 ) ) }
Given a closure which generates a uni-directional underlying transport channel, create a
pair of dual [`Chan`]s which communicate over the transport channels resulting from these
closures.
Given a closure which generates a uni - directional underlying transport channel create a pair of dual [ ` Chan ` ] s which communicate over the transport channels resulting from these closures .
make
impl FnMut() -> (Tx, Rx)
examples
```
use dialectic::prelude::*;
use dialectic_tokio_mpsc as mpsc.
` ` ` use dialectic :: prelude :: * ; use dialectic_tokio_mpsc as mpsc .
#[tokio::main]
None
async fn main() {
None
}
None