pub fn channel<T>(name: &str, data_dir: &Path) -> Result<(Sender<T>, Receiver<T>), Error>
where
    T: Serialize + DeserializeOwned,
{
    channel_with_explicit_capacity(name, data_dir, 0x100_000, 0x10_000_000, usize::max_value())
}
/// Create a (Sender, Reciever) pair in a like fashion to
/// [`std::sync::mpsc::channel`](https://doc.rust-lang.org/std/sync/mpsc/fn.channel.html)
///
/// This function creates a Sender and Receiver pair with name `name` whose
/// queue files are stored in `data_dir`. The maximum number of bytes that will
/// be stored in-memory is 1Mb and the maximum size of a queue file will be
/// 100Mb. The Sender is clonable.
///
/// # Example
/// ```
/// extern crate tempdir;
/// extern crate hopper;
///
/// let dir = tempdir::TempDir::new("hopper").unwrap();
/// let (mut snd, mut rcv) = hopper::channel("example", dir.path()).unwrap();
///
/// snd.send(9);
/// assert_eq!(Some(9), rcv.iter().next());
/// ```


This function creates a Sender and Receiver pair with name `name` whose
queue files are stored in `data_dir`. The maximum number of bytes that will
be stored in-memory is 1Mb and the maximum size of a queue file will be
100Mb. The Sender is clonable.
This function creates a Sender and Receiver pair with name ` name ` whose queue files are stored in ` data_dir ` . The maximum number of bytes that will be stored in - memory is 1Mb and the maximum size of a queue file will be 100Mb . The Sender is clonable .
pub fn channel<T>(name: &str, data_dir: &Path) -> Result<(Sender<T>, Receiver<T>), Error>
where
    T: Serialize + DeserializeOwned,
{
    channel_with_explicit_capacity(name, data_dir, 0x100_000, 0x10_000_000, usize::max_value())
}
pub fn channel < T > ( name : & str , data_dir : & Path ) -> Result < ( Sender < T > , Receiver < T > ) , Error > where T : Serialize + DeserializeOwned , { channel_with_explicit_capacity ( name , data_dir , 0x100_000 , 0x10_000_000 , usize :: max_value ( ) ) }
Create a (Sender, Reciever) pair in a like fashion to
[`std::sync::mpsc::channel`](https://doc.rust-lang.org/std/sync/mpsc/fn.channel.html)
Create a ( Sender Reciever ) pair in a like fashion to [ ` std :: sync :: mpsc :: channel ` ] ( https : // doc . rust - lang . org / std / sync / mpsc / fn . channel . html )
name
&str
data_dir
&Path
name
&str
data_dir
&Path
example
```
extern crate tempdir;
extern crate hopper.

let dir = tempdir::TempDir::new("hopper").unwrap();
let (mut snd, mut rcv) = hopper::channel("example", dir.path()).unwrap().


` ` ` extern crate tempdir ; extern crate hopper . let dir = tempdir :: TempDir :: new ( " hopper " ) . unwrap () ; let ( mut snd mut rcv ) = hopper :: channel ( " example " dir . path () ) . unwrap () .