Trait wrpc_transport::Encode
source · pub trait Encode<T>: Sized {
type Encoder: Encoder<Self> + Deferred<T> + Default + Send;
// Provided methods
fn encode(
self,
enc: &mut Self::Encoder,
dst: &mut BytesMut,
) -> Result<Option<DeferredFn<T>>, <Self::Encoder as Encoder<Self>>::Error> { ... }
fn encode_iter_own<I>(
items: I,
enc: &mut Self::Encoder,
dst: &mut BytesMut,
) -> Result<Option<DeferredFn<T>>, <Self::Encoder as Encoder<Self>>::Error>
where I: IntoIterator<Item = Self>,
I::IntoIter: ExactSizeIterator,
T: Index<T> + Send + Sync + 'static { ... }
fn encode_iter_ref<'a, I>(
items: I,
enc: &mut Self::Encoder,
dst: &mut BytesMut,
) -> Result<Option<DeferredFn<T>>, <Self::Encoder as Encoder<&'a Self>>::Error>
where I: IntoIterator<Item = &'a Self>,
I::IntoIter: ExactSizeIterator,
T: Index<T> + Send + Sync + 'static,
Self::Encoder: Encoder<&'a Self> { ... }
fn encode_list_own(
items: Vec<Self>,
enc: &mut Self::Encoder,
dst: &mut BytesMut,
) -> Result<Option<DeferredFn<T>>, <Self::Encoder as Encoder<Self>>::Error>
where T: Index<T> + Send + Sync + 'static { ... }
fn encode_list_ref<'a>(
items: &'a [Self],
enc: &mut Self::Encoder,
dst: &mut BytesMut,
) -> Result<Option<DeferredFn<T>>, <Self::Encoder as Encoder<&'a Self>>::Error>
where T: Index<T> + Send + Sync + 'static,
Self::Encoder: Encoder<&'a Self> { ... }
}
Expand description
Defines value encoding
Required Associated Types§
Provided Methods§
sourcefn encode(
self,
enc: &mut Self::Encoder,
dst: &mut BytesMut,
) -> Result<Option<DeferredFn<T>>, <Self::Encoder as Encoder<Self>>::Error>
fn encode( self, enc: &mut Self::Encoder, dst: &mut BytesMut, ) -> Result<Option<DeferredFn<T>>, <Self::Encoder as Encoder<Self>>::Error>
Convenience function for encoding a value
sourcefn encode_iter_own<I>(
items: I,
enc: &mut Self::Encoder,
dst: &mut BytesMut,
) -> Result<Option<DeferredFn<T>>, <Self::Encoder as Encoder<Self>>::Error>where
I: IntoIterator<Item = Self>,
I::IntoIter: ExactSizeIterator,
T: Index<T> + Send + Sync + 'static,
fn encode_iter_own<I>(
items: I,
enc: &mut Self::Encoder,
dst: &mut BytesMut,
) -> Result<Option<DeferredFn<T>>, <Self::Encoder as Encoder<Self>>::Error>where
I: IntoIterator<Item = Self>,
I::IntoIter: ExactSizeIterator,
T: Index<T> + Send + Sync + 'static,
Encode an iterator of owned values
sourcefn encode_iter_ref<'a, I>(
items: I,
enc: &mut Self::Encoder,
dst: &mut BytesMut,
) -> Result<Option<DeferredFn<T>>, <Self::Encoder as Encoder<&'a Self>>::Error>where
I: IntoIterator<Item = &'a Self>,
I::IntoIter: ExactSizeIterator,
T: Index<T> + Send + Sync + 'static,
Self::Encoder: Encoder<&'a Self>,
fn encode_iter_ref<'a, I>(
items: I,
enc: &mut Self::Encoder,
dst: &mut BytesMut,
) -> Result<Option<DeferredFn<T>>, <Self::Encoder as Encoder<&'a Self>>::Error>where
I: IntoIterator<Item = &'a Self>,
I::IntoIter: ExactSizeIterator,
T: Index<T> + Send + Sync + 'static,
Self::Encoder: Encoder<&'a Self>,
Encode an iterator of value references
Object Safety§
This trait is not object safe.