pub struct RaknetServerBuilder { /* private fields */ }Expand description
Builder for RaknetServer.
Implementations§
Source§impl RaknetServerBuilder
impl RaknetServerBuilder
Sourcepub fn transport_config(self, config: TransportConfig) -> Self
pub fn transport_config(self, config: TransportConfig) -> Self
Replaces transport configuration.
Sourcepub fn runtime_config(self, config: ShardedRuntimeConfig) -> Self
pub fn runtime_config(self, config: ShardedRuntimeConfig) -> Self
Replaces runtime/shard configuration.
Sourcepub fn bind_addr(self, bind_addr: SocketAddr) -> Self
pub fn bind_addr(self, bind_addr: SocketAddr) -> Self
Sets bind address in transport configuration.
Sourcepub fn shard_count(self, shard_count: usize) -> Self
pub fn shard_count(self, shard_count: usize) -> Self
Sets shard count (minimum 1).
Sourcepub fn transport_config_mut(&mut self) -> &mut TransportConfig
pub fn transport_config_mut(&mut self) -> &mut TransportConfig
Returns mutable transport config for in-place adjustments.
Sourcepub fn runtime_config_mut(&mut self) -> &mut ShardedRuntimeConfig
pub fn runtime_config_mut(&mut self) -> &mut ShardedRuntimeConfig
Returns mutable runtime config for in-place adjustments.
Sourcepub async fn start(self) -> Result<RaknetServer>
pub async fn start(self) -> Result<RaknetServer>
Validates configs and starts the server.
Trait Implementations§
Source§impl Clone for RaknetServerBuilder
impl Clone for RaknetServerBuilder
Source§fn clone(&self) -> RaknetServerBuilder
fn clone(&self) -> RaknetServerBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RaknetServerBuilder
impl Debug for RaknetServerBuilder
Source§impl Default for RaknetServerBuilder
impl Default for RaknetServerBuilder
Source§fn default() -> RaknetServerBuilder
fn default() -> RaknetServerBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RaknetServerBuilder
impl RefUnwindSafe for RaknetServerBuilder
impl Send for RaknetServerBuilder
impl Sync for RaknetServerBuilder
impl Unpin for RaknetServerBuilder
impl UnsafeUnpin for RaknetServerBuilder
impl UnwindSafe for RaknetServerBuilder
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