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
sourceimpl<C: ChannelIndex> SharedConfig<C>
impl<C: ChannelIndex> SharedConfig<C>
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
sourceimpl<C: Clone + ChannelIndex> Clone for SharedConfig<C>
impl<C: Clone + ChannelIndex> Clone for SharedConfig<C>
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
Auto Trait Implementations
impl<C> RefUnwindSafe for SharedConfig<C> where
C: RefUnwindSafe,
impl<C> Send for SharedConfig<C>
impl<C> Sync for SharedConfig<C>
impl<C> Unpin for SharedConfig<C> where
C: Unpin,
impl<C> UnwindSafe for SharedConfig<C> where
C: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more