Trait Config

Source
pub trait Config: 'static {
    type Input: PartialEq + Pod + Zeroable + Send + Sync;
    type State: Clone + Send + Sync + 'static;
}
Expand description

Compile time parameterization for Backroll sessions.

Required Associated Types§

Source

type Input: PartialEq + Pod + Zeroable + Send + Sync

The input type for a Backroll session. This is the only game-related data transmitted over the network.

Reminder: Types implementing Pod may not have the same byte representation on platforms with different endianness. Backroll assumes that all players are running with the same endianness when encoding and decoding inputs. It may be worthwhile to ensure that all players are running with the same endianess.

Source

type State: Clone + Send + Sync + 'static

The save state type for the session. This type must be safe to send across threads and have a ’static lifetime. This type is also responsible for dropping any internal linked state via Drop.

Implementors§