Enum bevy_replicon::server::TickPolicy
source · pub enum TickPolicy {
MaxTickRate(u16),
EveryFrame,
Manual,
}
Expand description
Controls how often RepliconTick
is incremented on the server.
When RepliconTick
is mutated, the server’s replication
system will run. This means the tick policy controls how often server state is replicated.
Note that component updates are replicated over the unreliable channel, so if a component update packet is lost then component updates won’t be resent until the server’s replication system runs again.
Variants§
MaxTickRate(u16)
The replicon tick is incremented at most max ticks per second. In practice the tick rate may be lower if the app’s update cycle duration is too long.
By default it’s 30 ticks per second.
EveryFrame
The replicon tick is incremented every frame.
Manual
The user should manually configure ServerPlugin::increment_tick
or manually increment
RepliconTick
.
Trait Implementations§
source§impl Clone for TickPolicy
impl Clone for TickPolicy
source§fn clone(&self) -> TickPolicy
fn clone(&self) -> TickPolicy
Returns a copy 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 TickPolicy
impl Debug for TickPolicy
impl Copy for TickPolicy
Auto Trait Implementations§
impl Freeze for TickPolicy
impl RefUnwindSafe for TickPolicy
impl Send for TickPolicy
impl Sync for TickPolicy
impl Unpin for TickPolicy
impl UnwindSafe for TickPolicy
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
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.