Skip to main content

EmitAndCount

Trait EmitAndCount 

Source
pub trait EmitAndCount {
    // Required method
    fn emit(
        &mut self,
        encoder: &mut BinEncoder<'_>,
    ) -> Result<usize, ProtoError>;
}
Expand description

A trait that defines types which can be emitted as a set, with the associated count returned.

Required Methods§

Source

fn emit(&mut self, encoder: &mut BinEncoder<'_>) -> Result<usize, ProtoError>

Emit self to the encoder and return the count of items

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<'e, I: Iterator<Item = &'e E>, E: 'e + BinEncodable> EmitAndCount for I