pub struct Server;
Expand description
MPC websocket server handling JSON-RPC requests.
Implementations§
Source§impl Server
impl Server
Sourcepub async fn start(
path: &'static str,
addr: impl Into<SocketAddr>,
static_files: PathBuf,
) -> Result<()>
pub async fn start( path: &'static str, addr: impl Into<SocketAddr>, static_files: PathBuf, ) -> Result<()>
Start the server.
The websocket endpoint is mounted at path
,
the server will bind to addr
and static assets
are served from static_files
.
Logs are emitted using the tracing library, in release mode the logs are formatted as JSON.
Auto Trait Implementations§
impl Freeze for Server
impl RefUnwindSafe for Server
impl Send for Server
impl Sync for Server
impl Unpin for Server
impl UnwindSafe for Server
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