pub struct ReplicationTransportBridge { /* private fields */ }Expand description
Bridge between replication planning/frame building and client packet transport.
Implementations§
Source§impl ReplicationTransportBridge
impl ReplicationTransportBridge
Sourcepub const fn new(
config: ReplicationTransportConfig,
builder: ReplicationFrameBuilder,
) -> Self
pub const fn new( config: ReplicationTransportConfig, builder: ReplicationFrameBuilder, ) -> Self
Creates a replication transport bridge.
Sourcepub const fn config(&self) -> ReplicationTransportConfig
pub const fn config(&self) -> ReplicationTransportConfig
Returns configuration.
Sourcepub const fn builder(&self) -> ReplicationFrameBuilder
pub const fn builder(&self) -> ReplicationFrameBuilder
Returns frame builder configuration.
Sourcepub const fn stats(&self) -> ReplicationTransportStats
pub const fn stats(&self) -> ReplicationTransportStats
Returns accumulated statistics.
Sourcepub fn send_plan<T>(
&mut self,
transport: &mut T,
client_id: ClientId,
server_tick: Tick,
station: &Station,
components: &ComponentStore,
selection: &ComponentSelection,
plan: &ReplicationPlan,
) -> Result<ReplicationTransportReport, ReplicationTransportError<T::Error>>where
T: TransportSink,
pub fn send_plan<T>(
&mut self,
transport: &mut T,
client_id: ClientId,
server_tick: Tick,
station: &Station,
components: &ComponentStore,
selection: &ComponentSelection,
plan: &ReplicationPlan,
) -> Result<ReplicationTransportReport, ReplicationTransportError<T::Error>>where
T: TransportSink,
Builds, encodes, and sends a caller-provided replication plan.
Trait Implementations§
Source§impl Clone for ReplicationTransportBridge
impl Clone for ReplicationTransportBridge
Source§fn clone(&self) -> ReplicationTransportBridge
fn clone(&self) -> ReplicationTransportBridge
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ReplicationTransportBridge
impl Debug for ReplicationTransportBridge
Auto Trait Implementations§
impl Freeze for ReplicationTransportBridge
impl RefUnwindSafe for ReplicationTransportBridge
impl Send for ReplicationTransportBridge
impl Sync for ReplicationTransportBridge
impl Unpin for ReplicationTransportBridge
impl UnsafeUnpin for ReplicationTransportBridge
impl UnwindSafe for ReplicationTransportBridge
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