pub fn close(self)
    where
        S: Session<Action = Done>,
    {
        drop(self)
    }
/// Close a finished session, dropping the underlying connections.
///
/// If called inside a future given to [`split`](Chan::split) or [`call`](Chan::call), the
/// underlying connections are implicitly recovered for use in subsequent actions in the
/// session, or if called in a future given to in [`over`](Session::over), are returned to the
/// caller.
///
/// # Examples
///
/// Starting with a channel whose session type is already [`Done`], we can immediately close the
/// channel.
///
/// ```
/// use dialectic::prelude::*;
/// use dialectic_tokio_mpsc as mpsc;
///
/// # #[tokio::main]
/// # async fn main() {
/// let (c1, c2) = <Session! {}>::channel(mpsc::unbounded_channel);
/// c1.close();
/// c2.close();
/// # }
/// ```
///
/// However, if the channel's session type is *not* `Done`, it is a type error to attempt to
/// close the channel. The following code will not compile:
///
/// ```compile_fail
/// use dialectic::prelude::*;
/// use dialectic_tokio_mpsc as mpsc;
///
/// # #[tokio::main]
/// # async fn main() {
/// let (c1, c2) = <Session! { loop { send String } }>::channel(mpsc::unbounded_channel);
/// c1.close();
/// c2.close();
/// # }
/// ```
///
/// If you *really* want to destruct a channel before the end of its session, use
/// [`into_inner`](Chan::into_inner), but beware that this may cause the party on the other end
/// of the channel to throw errors due to your violation of the channel's protocol!
Close a finished session, dropping the underlying connections.
Close a finished session dropping the underlying connections .
pub fn close(self)
    where
        S: Session<Action = Done>,
    {
        drop(self)
    }
pub fn close ( self ) where S : Session < Action = Done > , { drop ( self ) }
Close a finished session, dropping the underlying connections.
Close a finished session dropping the underlying connections .
self
examples
Starting with a channel whose session type is already [`Done`], we can immediately close the
channel.

```
use dialectic::prelude::*;
use dialectic_tokio_mpsc as mpsc.
Starting with a channel whose session type is already [ ` Done ` ] we can immediately close the channel . ` ` ` use dialectic :: prelude :: * ; use dialectic_tokio_mpsc as mpsc .
#[tokio::main]
None
async fn main() {
None
}


However, if the channel's session type is *not* `Done`, it is a type error to attempt to
close the channel. The following code will not compile.

```compile_fail
use dialectic::prelude::*;
use dialectic_tokio_mpsc as mpsc.
However if the channel ' s session type is * not * ` Done ` it is a type error to attempt to close the channel . The following code will not compile . ` ` ` compile_fail use dialectic :: prelude :: * ; use dialectic_tokio_mpsc as mpsc .
#[tokio::main]
None
async fn main() {
None
}


If you *really* want to destruct a channel before the end of its session, use
[`into_inner`](Chan::into_inner), but beware that this may cause the party on the other end
of the channel to throw errors due to your violation of the channel's protocol!
If you * really * want to destruct a channel before the end of its session use [ ` into_inner ` ] ( Chan :: into_inner ) but beware that this may cause the party on the other end of the channel to throw errors due to your violation of the channel ' s protocol!