pub trait ConnectionRequest {
type Error: Error;
type NetStream;
// Required methods
fn new(stream: Self::NetStream) -> Self;
fn verify<L: PeerList>(
self,
list: &L,
) -> Result<Self::NetStream, Self::Error>;
unsafe fn unverify(self) -> Self::NetStream;
}Expand description
implemented on both async and sync connection requests structs to define how to verify a peer
Required Associated Types§
Required Methods§
fn new(stream: Self::NetStream) -> Self
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.