This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //! A server with some middleware | |
| //! | |
| //! We have some server process [`server`] | |
| //! that produces byte slices `&[u8]` and feeds them to some | |
| //! [`ServerResponder`] client. Since the client gets the | |
| //! bytes by reference and it must be prepared to receive them | |
| //! for any lifetime, it's effectively a `for<'a> Fn(&'a [u8])` callback. | |
| //! | |
| //! Now to make things more interesting, we also want to have some middleware | |
| //! that transforms the initial vector slice into something. |
OlderNewer