pub fn encode<T>(&self, data: T) -> impl Future<Item = Vec<FragmentBuf>, Error = Error>
    where
        T: AsRef<[u8]> + Send + 'static,
    {
        let builder = self.builder.clone();
        let result = DefaultCpuTaskQueue
            .async_call(move || Self::with_coder(&builder, |coder| coder.encode(data.as_ref())));
        LazyResult(result)
    }
/// Encodes the given data to fragments asynchronously.
///
/// The encoding process will be executed on a thread in the pool.
///
/// The result vector contains `N` data fragments and `M` parity fragments
/// (where `N = self.data_fragments()` and `M = self.parity_fragments()`).
Encodes the given data to fragments asynchronously.
The encoding process will be executed on a thread in the pool.


Encodes the given data to fragments asynchronously . The encoding process will be executed on a thread in the pool .
pub fn encode<T>(&self, data: T) -> impl Future<Item = Vec<FragmentBuf>, Error = Error>
    where
        T: AsRef<[u8]> + Send + 'static,
    {
        let builder = self.builder.clone();
        let result = DefaultCpuTaskQueue
            .async_call(move || Self::with_coder(&builder, |coder| coder.encode(data.as_ref())));
        LazyResult(result)
    }
pub fn encode < T > ( & self , data : T ) -> impl Future < Item = Vec < FragmentBuf > , Error = Error > where T : AsRef < [ u8 ] > + Send + ' static , { let builder = self . builder . clone ( ) ; let result = DefaultCpuTaskQueue . async_call ( move | | Self :: with_coder ( & builder , | coder | coder . encode ( data . as_ref ( ) ) ) ) ; LazyResult ( result ) }
Encodes the given data to fragments asynchronously.
Encodes the given data to fragments asynchronously .
&self
data
T
&self
data
T