Skip to main content

FramerFactory

Trait FramerFactory 

Source
pub trait FramerFactory {
    type Framer: Framer + Send;

    // Required method
    fn framer(&self) -> Self::Framer;
}
Expand description

Builds a fresh Framer per connection.

A blanket impl covers closures, so a caller writes || CobsFramer::new().

Required Associated Types§

Source

type Framer: Framer + Send

The framer produced.

Required Methods§

Source

fn framer(&self) -> Self::Framer

Build one, for one connection.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<F, T> FramerFactory for F
where F: Fn() -> T, T: Framer + Send,