Struct naia_shared::SharedConfig
source · [−]pub struct SharedConfig<C: ChannelIndex> {
pub socket: SocketConfig,
pub channel: ChannelConfig<C>,
pub tick_interval: Option<Duration>,
pub compression: Option<CompressionConfig>,
}
Expand description
Contains Config properties which will be shared by Server and Client
Fields
socket: SocketConfig
Used to configure the underlying socket
channel: ChannelConfig<C>
Config for Message channels
tick_interval: Option<Duration>
The duration between each tick
compression: Option<CompressionConfig>
Configuration used to control compression parameters
Implementations
sourcepub fn new(
socket: SocketConfig,
channel: &[Channel<C>],
tick_interval: Option<Duration>,
compression: Option<CompressionConfig>
) -> Self
pub fn new(
socket: SocketConfig,
channel: &[Channel<C>],
tick_interval: Option<Duration>,
compression: Option<CompressionConfig>
) -> Self
Creates a new SharedConfig
Trait Implementations
sourcefn clone(&self) -> SharedConfig<C>
fn clone(&self) -> SharedConfig<C>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more