Skip to main content

Server

Trait Server 

Source
pub(crate) trait Server {
    // Required methods
    async fn mint_code(&self) -> Result<String, String>;
    async fn entry(&self, code: &str) -> Result<Entry, String>;
    async fn answer(&self, code: &str, accept: bool) -> Result<bool, String>;
}
Expand description

srv, as open talks to it (a trait so the flow is tested without a network).

Required Methods§

Source

async fn mint_code(&self) -> Result<String, String>

Source

async fn entry(&self, code: &str) -> Result<Entry, String>

Source

async fn answer(&self, code: &str, accept: bool) -> Result<bool, String>

True when a session of that code was waiting for the answer.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§