pub trait TransportKind: Sync {
// Required methods
fn schemes(&self) -> &'static [&'static str];
fn connect(&self, url: &Url) -> Result<Box<dyn Transport>>;
fn listen(&self, url: &Url) -> Result<Box<dyn Listener>>;
}Expand description
Required Methods§
Sourcefn schemes(&self) -> &'static [&'static str]
fn schemes(&self) -> &'static [&'static str]
URL schemes this kind owns, e.g. ["inproc"] or
["tcp", "tcp+tls"]. Claimed schemes must be in
crate::url::KNOWN_SCHEMES.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".