Struct evoke::server::ServerBuilder
source · [−]pub struct ServerBuilder<P, R> { /* private fields */ }
Expand description
This type implements builder-pattern to configure ServerSystem
.
Allows adding new descriptors and setting remote player type.
Implementations
sourceimpl ServerBuilder<NoRemotePlayerType, ()>
impl ServerBuilder<NoRemotePlayerType, ()>
sourcepub const fn new() -> Self
pub const fn new() -> Self
Returns new un-configured ServerBuilder
.
sourceimpl<R> ServerBuilder<NoRemotePlayerType, R>
impl<R> ServerBuilder<NoRemotePlayerType, R>
sourcepub fn with_player<P>(self) -> ServerBuilder<P, R> where
P: RemotePlayer,
pub fn with_player<P>(self) -> ServerBuilder<P, R> where
P: RemotePlayer,
Sets type of remote player.
sourceimpl<P> ServerBuilder<P, ()>
impl<P> ServerBuilder<P, ()>
sourcepub fn with_descriptor<T>(self) -> ServerBuilder<P, (T,)> where
T: Descriptor,
pub fn with_descriptor<T>(self) -> ServerBuilder<P, (T,)> where
T: Descriptor,
Adds component descriptor to manage state replication.
sourcepub fn build(&self, listener: TcpListener) -> ServerSystem where
P: RemotePlayer,
pub fn build(&self, listener: TcpListener) -> ServerSystem where
P: RemotePlayer,
Builds ServerSystem
configured to use provided remote player and descriptors.
Takes listener for accepting connections from clients.
sourceimpl<PLAYER, A> ServerBuilder<PLAYER, (A,)>
impl<PLAYER, A> ServerBuilder<PLAYER, (A,)>
sourcepub fn with_descriptor<T>(self) -> ServerBuilder<PLAYER, (A, T)> where
T: Descriptor,
pub fn with_descriptor<T>(self) -> ServerBuilder<PLAYER, (A, T)> where
T: Descriptor,
Adds component descriptor to manage state replication.
sourcepub fn build(&self, listener: TcpListener) -> ServerSystem where
PLAYER: RemotePlayer,
A: Descriptor,
pub fn build(&self, listener: TcpListener) -> ServerSystem where
PLAYER: RemotePlayer,
A: Descriptor,
Builds ServerSystem
configured to use provided remote player and descriptors.
Takes listener for accepting connections from clients.
sourceimpl<PLAYER, A, B> ServerBuilder<PLAYER, (A, B)>
impl<PLAYER, A, B> ServerBuilder<PLAYER, (A, B)>
sourcepub fn with_descriptor<T>(self) -> ServerBuilder<PLAYER, (A, B, T)> where
T: Descriptor,
pub fn with_descriptor<T>(self) -> ServerBuilder<PLAYER, (A, B, T)> where
T: Descriptor,
Adds component descriptor to manage state replication.
sourcepub fn build(&self, listener: TcpListener) -> ServerSystem where
PLAYER: RemotePlayer,
A: Descriptor,
B: Descriptor,
pub fn build(&self, listener: TcpListener) -> ServerSystem where
PLAYER: RemotePlayer,
A: Descriptor,
B: Descriptor,
Builds ServerSystem
configured to use provided remote player and descriptors.
Takes listener for accepting connections from clients.
sourceimpl<PLAYER, A, B, C> ServerBuilder<PLAYER, (A, B, C)>
impl<PLAYER, A, B, C> ServerBuilder<PLAYER, (A, B, C)>
sourcepub fn with_descriptor<T>(self) -> ServerBuilder<PLAYER, (A, B, C, T)> where
T: Descriptor,
pub fn with_descriptor<T>(self) -> ServerBuilder<PLAYER, (A, B, C, T)> where
T: Descriptor,
Adds component descriptor to manage state replication.
sourcepub fn build(&self, listener: TcpListener) -> ServerSystem where
PLAYER: RemotePlayer,
A: Descriptor,
B: Descriptor,
C: Descriptor,
pub fn build(&self, listener: TcpListener) -> ServerSystem where
PLAYER: RemotePlayer,
A: Descriptor,
B: Descriptor,
C: Descriptor,
Builds ServerSystem
configured to use provided remote player and descriptors.
Takes listener for accepting connections from clients.
sourceimpl<PLAYER, A, B, C, D> ServerBuilder<PLAYER, (A, B, C, D)>
impl<PLAYER, A, B, C, D> ServerBuilder<PLAYER, (A, B, C, D)>
sourcepub fn with_descriptor<T>(self) -> ServerBuilder<PLAYER, (A, B, C, D, T)> where
T: Descriptor,
pub fn with_descriptor<T>(self) -> ServerBuilder<PLAYER, (A, B, C, D, T)> where
T: Descriptor,
Adds component descriptor to manage state replication.
sourcepub fn build(&self, listener: TcpListener) -> ServerSystem where
PLAYER: RemotePlayer,
A: Descriptor,
B: Descriptor,
C: Descriptor,
D: Descriptor,
pub fn build(&self, listener: TcpListener) -> ServerSystem where
PLAYER: RemotePlayer,
A: Descriptor,
B: Descriptor,
C: Descriptor,
D: Descriptor,
Builds ServerSystem
configured to use provided remote player and descriptors.
Takes listener for accepting connections from clients.
sourceimpl<PLAYER, A, B, C, D, E> ServerBuilder<PLAYER, (A, B, C, D, E)>
impl<PLAYER, A, B, C, D, E> ServerBuilder<PLAYER, (A, B, C, D, E)>
sourcepub fn with_descriptor<T>(self) -> ServerBuilder<PLAYER, (A, B, C, D, E, T)> where
T: Descriptor,
pub fn with_descriptor<T>(self) -> ServerBuilder<PLAYER, (A, B, C, D, E, T)> where
T: Descriptor,
Adds component descriptor to manage state replication.
sourcepub fn build(&self, listener: TcpListener) -> ServerSystem where
PLAYER: RemotePlayer,
A: Descriptor,
B: Descriptor,
C: Descriptor,
D: Descriptor,
E: Descriptor,
pub fn build(&self, listener: TcpListener) -> ServerSystem where
PLAYER: RemotePlayer,
A: Descriptor,
B: Descriptor,
C: Descriptor,
D: Descriptor,
E: Descriptor,
Builds ServerSystem
configured to use provided remote player and descriptors.
Takes listener for accepting connections from clients.
sourceimpl<PLAYER, A, B, C, D, E, F> ServerBuilder<PLAYER, (A, B, C, D, E, F)>
impl<PLAYER, A, B, C, D, E, F> ServerBuilder<PLAYER, (A, B, C, D, E, F)>
sourcepub fn with_descriptor<T>(self) -> ServerBuilder<PLAYER, (A, B, C, D, E, F, T)> where
T: Descriptor,
pub fn with_descriptor<T>(self) -> ServerBuilder<PLAYER, (A, B, C, D, E, F, T)> where
T: Descriptor,
Adds component descriptor to manage state replication.
sourcepub fn build(&self, listener: TcpListener) -> ServerSystem where
PLAYER: RemotePlayer,
A: Descriptor,
B: Descriptor,
C: Descriptor,
D: Descriptor,
E: Descriptor,
F: Descriptor,
pub fn build(&self, listener: TcpListener) -> ServerSystem where
PLAYER: RemotePlayer,
A: Descriptor,
B: Descriptor,
C: Descriptor,
D: Descriptor,
E: Descriptor,
F: Descriptor,
Builds ServerSystem
configured to use provided remote player and descriptors.
Takes listener for accepting connections from clients.
sourceimpl<PLAYER, A, B, C, D, E, F, G> ServerBuilder<PLAYER, (A, B, C, D, E, F, G)>
impl<PLAYER, A, B, C, D, E, F, G> ServerBuilder<PLAYER, (A, B, C, D, E, F, G)>
sourcepub fn with_descriptor<T>(
self
) -> ServerBuilder<PLAYER, (A, B, C, D, E, F, G, T)> where
T: Descriptor,
pub fn with_descriptor<T>(
self
) -> ServerBuilder<PLAYER, (A, B, C, D, E, F, G, T)> where
T: Descriptor,
Adds component descriptor to manage state replication.
sourcepub fn build(&self, listener: TcpListener) -> ServerSystem where
PLAYER: RemotePlayer,
A: Descriptor,
B: Descriptor,
C: Descriptor,
D: Descriptor,
E: Descriptor,
F: Descriptor,
G: Descriptor,
pub fn build(&self, listener: TcpListener) -> ServerSystem where
PLAYER: RemotePlayer,
A: Descriptor,
B: Descriptor,
C: Descriptor,
D: Descriptor,
E: Descriptor,
F: Descriptor,
G: Descriptor,
Builds ServerSystem
configured to use provided remote player and descriptors.
Takes listener for accepting connections from clients.
sourceimpl<PLAYER, A, B, C, D, E, F, G, H> ServerBuilder<PLAYER, (A, B, C, D, E, F, G, H)>
impl<PLAYER, A, B, C, D, E, F, G, H> ServerBuilder<PLAYER, (A, B, C, D, E, F, G, H)>
sourcepub fn with_descriptor<T>(
self
) -> ServerBuilder<PLAYER, (A, B, C, D, E, F, G, H, T)> where
T: Descriptor,
pub fn with_descriptor<T>(
self
) -> ServerBuilder<PLAYER, (A, B, C, D, E, F, G, H, T)> where
T: Descriptor,
Adds component descriptor to manage state replication.
sourcepub fn build(&self, listener: TcpListener) -> ServerSystem where
PLAYER: RemotePlayer,
A: Descriptor,
B: Descriptor,
C: Descriptor,
D: Descriptor,
E: Descriptor,
F: Descriptor,
G: Descriptor,
H: Descriptor,
pub fn build(&self, listener: TcpListener) -> ServerSystem where
PLAYER: RemotePlayer,
A: Descriptor,
B: Descriptor,
C: Descriptor,
D: Descriptor,
E: Descriptor,
F: Descriptor,
G: Descriptor,
H: Descriptor,
Builds ServerSystem
configured to use provided remote player and descriptors.
Takes listener for accepting connections from clients.
sourceimpl<PLAYER, A, B, C, D, E, F, G, H, I> ServerBuilder<PLAYER, (A, B, C, D, E, F, G, H, I)>
impl<PLAYER, A, B, C, D, E, F, G, H, I> ServerBuilder<PLAYER, (A, B, C, D, E, F, G, H, I)>
sourcepub fn with_descriptor<T>(
self
) -> ServerBuilder<PLAYER, (A, B, C, D, E, F, G, H, I, T)> where
T: Descriptor,
pub fn with_descriptor<T>(
self
) -> ServerBuilder<PLAYER, (A, B, C, D, E, F, G, H, I, T)> where
T: Descriptor,
Adds component descriptor to manage state replication.
sourcepub fn build(&self, listener: TcpListener) -> ServerSystem where
PLAYER: RemotePlayer,
A: Descriptor,
B: Descriptor,
C: Descriptor,
D: Descriptor,
E: Descriptor,
F: Descriptor,
G: Descriptor,
H: Descriptor,
I: Descriptor,
pub fn build(&self, listener: TcpListener) -> ServerSystem where
PLAYER: RemotePlayer,
A: Descriptor,
B: Descriptor,
C: Descriptor,
D: Descriptor,
E: Descriptor,
F: Descriptor,
G: Descriptor,
H: Descriptor,
I: Descriptor,
Builds ServerSystem
configured to use provided remote player and descriptors.
Takes listener for accepting connections from clients.
Trait Implementations
sourceimpl Default for ServerBuilder<NoRemotePlayerType, ()>
impl Default for ServerBuilder<NoRemotePlayerType, ()>
Auto Trait Implementations
impl<P, R> RefUnwindSafe for ServerBuilder<P, R> where
P: RefUnwindSafe,
R: RefUnwindSafe,
impl<P, R> Send for ServerBuilder<P, R> where
P: Send,
R: Send,
impl<P, R> Sync for ServerBuilder<P, R> where
P: Sync,
R: Sync,
impl<P, R> Unpin for ServerBuilder<P, R> where
P: Unpin,
R: Unpin,
impl<P, R> UnwindSafe for ServerBuilder<P, R> where
P: UnwindSafe,
R: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Component for T where
T: 'static,
impl<T> Component for T where
T: 'static,
sourcepub fn info() -> ComponentInfo
pub fn info() -> ComponentInfo
Returns ComponentInfo
for this component type.
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more