pub struct ServerBuilder { /* private fields */ }Implementations§
Source§impl ServerBuilder
impl ServerBuilder
Sourcepub fn new(uri: &str) -> Self
pub fn new(uri: &str) -> Self
Create a new Server with given URI.
The provided URI must match the one used when configuring the game state integration.
Sourcepub fn register<H>(self, handler: H) -> Selfwhere
H: Handler,
pub fn register<H>(self, handler: H) -> Selfwhere
H: Handler,
Register a new handler on this Server.
Incoming events from game state integration will be broadcast to all registered handlers.
Sourcepub fn start(self) -> Result<Server, GameStateIntegrationError>
pub fn start(self) -> Result<Server, GameStateIntegrationError>
Start listening to requests and return a handle to the associated [Listener] task.
Auto Trait Implementations§
impl Freeze for ServerBuilder
impl !RefUnwindSafe for ServerBuilder
impl Send for ServerBuilder
impl Sync for ServerBuilder
impl Unpin for ServerBuilder
impl !UnwindSafe for ServerBuilder
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