pub trait Limiter: 'static + Send {
// Required method
fn on_connection(&mut self, info: &ConnectionInfo<'_>) -> Limits;
// Provided method
fn on_post_handshake(
&mut self,
info: &HandshakeInfo<'_>,
limits: &mut UpdatableLimits<'_>,
) { ... }
}Expand description
Creates limits for a given connection
Required Methods§
fn on_connection(&mut self, info: &ConnectionInfo<'_>) -> Limits
Provided Methods§
Sourcefn on_post_handshake(
&mut self,
info: &HandshakeInfo<'_>,
limits: &mut UpdatableLimits<'_>,
)
fn on_post_handshake( &mut self, info: &HandshakeInfo<'_>, limits: &mut UpdatableLimits<'_>, )
Provides another opportunity to change connection limits with information from the handshake