pub trait LegacyProxyHook: Send + Sync {
// Provided methods
fn wants_control_mutation(&self) -> bool { ... }
fn on_control_message(
&self,
_session_id: SessionId,
_side: ProxySide,
_message: &AnyControlMessage,
_raw_bytes: &[u8],
) -> Option<Vec<u8>> { ... }
fn on_datagram(
&self,
_session_id: SessionId,
_side: ProxySide,
_header: &AnyDatagramHeader,
_raw_bytes: &[u8],
) -> Option<Vec<u8>> { ... }
}๐Deprecated since 0.4.0:
implement ProxyHook directly; wrap in LegacyHook to migrate
Expand description
The 0.3.x hook shape, kept so existing implementations still compile.
Implement ProxyHook directly for new code; wrap an existing
implementation in LegacyHook to migrate without rewriting it.
Provided Methodsยง
Sourcefn wants_control_mutation(&self) -> bool
๐Deprecated since 0.4.0: implement ProxyHook directly; wrap in LegacyHook to migrate
fn wants_control_mutation(&self) -> bool
implement ProxyHook directly; wrap in LegacyHook to migrate
Whether this hook may rewrite control messages.
Sourcefn on_control_message(
&self,
_session_id: SessionId,
_side: ProxySide,
_message: &AnyControlMessage,
_raw_bytes: &[u8],
) -> Option<Vec<u8>>
๐Deprecated since 0.4.0: implement ProxyHook directly; wrap in LegacyHook to migrate
fn on_control_message( &self, _session_id: SessionId, _side: ProxySide, _message: &AnyControlMessage, _raw_bytes: &[u8], ) -> Option<Vec<u8>>
implement ProxyHook directly; wrap in LegacyHook to migrate
Called before forwarding a control message.
Sourcefn on_datagram(
&self,
_session_id: SessionId,
_side: ProxySide,
_header: &AnyDatagramHeader,
_raw_bytes: &[u8],
) -> Option<Vec<u8>>
๐Deprecated since 0.4.0: implement ProxyHook directly; wrap in LegacyHook to migrate
fn on_datagram( &self, _session_id: SessionId, _side: ProxySide, _header: &AnyDatagramHeader, _raw_bytes: &[u8], ) -> Option<Vec<u8>>
implement ProxyHook directly; wrap in LegacyHook to migrate
Called before forwarding a datagram.
Dyn Compatibilityยง
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".