pub struct RemoteServer { /* private fields */ }Expand description
The server. Clones share state.
Implementations§
Source§impl RemoteServer
impl RemoteServer
pub fn new(config: ServerConfig) -> Self
Sourcepub fn host(&self, hosted: Hosted)
pub fn host(&self, hosted: Hosted)
Host a backend under its descriptor’s backend id, replacing any
hosted under that id. A replacement changes the descriptor clients
negotiated, which they then see as identity_mismatch (3.2.5).
Sourcepub fn dispatched(&self) -> u64
pub fn dispatched(&self) -> u64
Hosted-backend infer calls so far: remote work actually started.
Sourcepub fn serve(
&self,
listener: TcpListener,
tls: Option<Arc<ServerConfig>>,
) -> Result<ServerHandle>
pub fn serve( &self, listener: TcpListener, tls: Option<Arc<ServerConfig>>, ) -> Result<ServerHandle>
Serve on listener. Plain HTTP is refused for a non-loopback
address unless tls is given (3.11).
Sourcepub async fn serve_loopback(&self) -> Result<ServerHandle>
pub async fn serve_loopback(&self) -> Result<ServerHandle>
Bind 127.0.0.1:0 and serve plain HTTP: the loopback conformance
setting.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RemoteServer
impl RefUnwindSafe for RemoteServer
impl Send for RemoteServer
impl Sync for RemoteServer
impl Unpin for RemoteServer
impl UnsafeUnpin for RemoteServer
impl UnwindSafe for RemoteServer
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