pub struct ServerConnector<H> { /* private fields */ }Expand description
a bridge between trillium servers and clients
Implementations§
Source§impl<H> ServerConnector<H>
impl<H> ServerConnector<H>
Sourcepub fn set_runtime(&mut self, runtime: impl Into<Runtime>) -> &mut Self
pub fn set_runtime(&mut self, runtime: impl Into<Runtime>) -> &mut Self
Sets the runtime, returning &mut Self for chaining
Sourcepub fn with_runtime(self, runtime: impl Into<Runtime>) -> Self
pub fn with_runtime(self, runtime: impl Into<Runtime>) -> Self
Owned chainable setter for the runtime, returning Self
Sourcepub fn server_config(&self) -> &Arc<ServerConfig>
pub fn server_config(&self) -> &Arc<ServerConfig>
Borrows the server config
Sourcepub fn set_server_config(
&mut self,
server_config: impl Into<Arc<ServerConfig>>,
) -> &mut Self
pub fn set_server_config( &mut self, server_config: impl Into<Arc<ServerConfig>>, ) -> &mut Self
Sets the server config, returning &mut Self for chaining
Sourcepub fn with_server_config(
self,
server_config: impl Into<Arc<ServerConfig>>,
) -> Self
pub fn with_server_config( self, server_config: impl Into<Arc<ServerConfig>>, ) -> Self
Owned chainable setter for the server config, returning Self
Source§impl<H: Handler> ServerConnector<H>
impl<H: Handler> ServerConnector<H>
Trait Implementations§
Source§impl<H> Clone for ServerConnector<H>
impl<H> Clone for ServerConnector<H>
Source§impl<H: Handler> Connector for ServerConnector<H>
impl<H: Handler> Connector for ServerConnector<H>
Source§type Runtime = Runtime
type Runtime = Runtime
The
RuntimeTrait for this ConnectorSource§type Udp = ()
type Udp = ()
The async UDP socket type for this connector. Used by QUIC adapters
for HTTP/3 support. Connectors that do not support UDP should set
this to
().Source§async fn connect(&self, url: &Url) -> Result<Self::Transport>
async fn connect(&self, url: &Url) -> Result<Self::Transport>
Initiate a connection to the provided url
Source§async fn resolve(&self, _host: &str, _port: u16) -> Result<Vec<SocketAddr>>
async fn resolve(&self, _host: &str, _port: u16) -> Result<Vec<SocketAddr>>
Perform a DNS lookup for a given host-and-port
Source§fn arced(self) -> ArcedConnectorwhere
Self: Sized,
fn arced(self) -> ArcedConnectorwhere
Self: Sized,
Returns an object-safe
ArcedConnector. Do not implement this.Auto Trait Implementations§
impl<H> Freeze for ServerConnector<H>
impl<H> !RefUnwindSafe for ServerConnector<H>
impl<H> Send for ServerConnector<H>
impl<H> Sync for ServerConnector<H>
impl<H> !Unpin for ServerConnector<H>
impl<H> !UnsafeUnpin for ServerConnector<H>
impl<H> !UnwindSafe for ServerConnector<H>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more