Skip to main content

Crate naia_bevy_shared

Crate naia_bevy_shared 

Source

Re-exports§

pub use bevy_ecs;

Structs§

BitReader
BitWriter
ChannelKind
ChannelKind - should be one unique value for each type of Channel
ComponentAccessor
ComponentFieldUpdate
A single serialised field update payload for a component, identified by field index.
ComponentKind
ComponentKind - should be one unique value for each type of Component
ComponentKinds
A map to hold all component types
ComponentUpdate
A serialised component-field update payload together with its ComponentKind tag.
DiffMask
Variable-length bitmask where each bit tracks whether the corresponding property on a replicated component has been mutated and needs to be sent to the remote peer.
EntityAuthAccessor
Read-only handle to an entity’s shared authority state; cloneable and safe to embed in components.
EntityDoesNotExistError
Error returned when an entity look-up fails during entity-to-global conversion.
EntityProperty
A component field that stores an optional reference to another entity, with lifecycle tracking across host/remote/delegated states.
FakeEntityConverter
No-op converter that always succeeds with entity ID 0; useful in test contexts where real mapping is not needed.
FileBitWriter
GameInstant
Server-relative millisecond timestamp that wraps at 2^22 ms (~70 minutes).
GlobalEntity
Stable, process-wide identifier for a replicated entity, independent of any ECS-local handle.
HandleTickEvents
HandleWorldEvents
HostEntity
A host-assigned entity ID. Carries is_static so that static and dynamic entities from pools that both start at 0 remain distinct as hash map keys.
HostEntityAuthStatus
Combined view of an entity’s authority status from a specific endpoint’s perspective.
HostOwned
HostOwnedMap
HostSyncChangeTracking
HostSyncOwnedAddedTracking
Instant
Represents a specific moment in time
LinkConditionerConfig
Contains configuration required to initialize a LinkConditioner
LocalEntityMap
Bidirectional lookup table between GlobalEntity identifiers and their connection-local HostEntity or RemoteEntity counterparts.
MessageContainer
A reference-counted wrapper around a heap-allocated Message trait object.
MessageKind
MessageKind - should be one unique value for each type of Message
MessageKinds
Registry mapping Message types to compact wire net-IDs and their deserializers.
OwnedBitReader
ProcessPackets
Property
A Property of an Component/Message, that contains data which must be tracked for updates
PropertyMutator
Owned handle to a heap-allocated PropertyMutate implementor, used by EntityProperty to signal field changes.
Protocol
Random
Container for cross-platform Random methods
ReceivePackets
ReliableSettings
Tuning parameters for reliable channel delivery and backpressure.
RemoteEntity
A connection-local entity ID assigned by the remote peer, used on the receiving side of replication.
ReplicaDynMut
Mutable reference to a type-erased replicated component.
ReplicaDynRef
Shared reference to a type-erased replicated component.
ResourceAlreadyExists
Error returned when attempting to insert a resource type that is already present in the registry.
ResourceKinds
Protocol-wide table marking which ComponentKinds are Replicated Resources (vs ordinary components).
ResourceRegistry
Per-World bidirectional map between Resource TypeId and the hidden GlobalEntity carrying that resource as a single component.
ResponseReceiveKey
Typed token held by the receiver to identify which request a response answers.
ResponseSendKey
Typed token held by the sender to identify a pending request when its response arrives.
SendPackets
SerdeErr
The error message when failing to serialize/deserialize to/from the bit stream.
SharedPlugin
TickBufferSettings
Capacity settings for a tick-buffered channel.
Timer
A Timer with a given duration after which it will enter into a “Ringing” state. The Timer can be reset at an given time, or manually set to start “Ringing” again.
TranslateTickEvents
TranslateWorldEvents
WorldData
WorldMut
WorldOpCommand
A Bevy Command whose apply body is an arbitrary FnOnce(&mut World).
WorldRef
WorldToHostSync
WorldUpdate

Enums§

AuthorityError
Errors raised by entity- and resource-authority operations.
ChannelDirection
Permitted send direction(s) for a channel.
ChannelMode
Delivery semantics for a channel.
EntityAuthStatus
Authority lifecycle state for a delegated entity as observed by one endpoint.
HostSyncEvent

Constants§

MTU_SIZE_BYTES
The maximum of bytes that can be used for the payload of a given packet. (See #38 of http://ithare.com/64-network-dos-and-donts-for-game-engines-part-v-udp/)

Traits§

AppTag
BitWrite
Channel
Marker trait for types that represent a named communication channel.
ComponentAccess
ConstBitLength
EntityAndGlobalEntityConverter
Bidirectional conversion between a world-type entity E and a GlobalEntity.
LocalEntityAndGlobalEntityConverter
Conversions between the connection-local host/remote entity representations and the global entity space.
LocalEntityAndGlobalEntityConverterMut
Mutable extension of LocalEntityAndGlobalEntityConverter that can allocate new host-side entity slots.
Message
Core trait for all naia message types — provides serialization, kind lookup, and entity-relation hooks.
MessageBuilder
Factory trait that deserializes a concrete Message from raw bits.
Named
Trait for types with a stable protocol name.
PropertyMutate
Tracks which Properties have changed and need to be queued for syncing with the Client
ProtocolPlugin
Replicate
A struct that implements Replicate is a Component, or otherwise, a container of Properties that can be scoped, tracked, and synced, with a remote host
ReplicateBuilder
Factory trait for deserializing a concrete Replicate component or its partial updates from raw bits.
ReplicateBundle
ReplicatedResource
Type bound for a Replicated Resource. A type satisfying this bound is:
Request
Marker trait for message types that expect a typed response.
Response
Marker trait for message types that are sent as a reply to a Request.
Serde
A trait for objects that can be serialized to a bitstream.
SerdeFloatConversion
SerdeIntegerConversion
WorldMutType
Structures that implement the WorldMutType trait will be able to be loaded into the Server at which point the Server will use this interface to keep the WorldMutType in-sync with it’s own Entities/Components
WorldProxy
WorldProxyMut
WorldRefType
Structures that implement the WorldMutType trait will be able to be loaded into the Server at which point the Server will use this interface to keep the WorldMutType in-sync with it’s own Entities/Components

Functions§

sequence_greater_than
Returns whether or not a wrapping number is greater than another sequence_greater_than(2,1) will return true sequence_greater_than(1,2) will return false sequence_greater_than(1,1) will return false
sequence_less_than
Returns whether or not a wrapping number is greater than another sequence_less_than(1,2) will return true sequence_less_than(2,1) will return false sequence_less_than(1,1) will return false
wrapping_diff
Retrieves the wrapping difference between 2 u16 values wrapping_diff(1,2) will return 1 wrapping_diff(2,1) will return -1 wrapping_diff(65535,0) will return 1 wrapping_diff(0,65535) will return -1

Type Aliases§

SignedFloat
SignedInteger
SignedVariableFloat
SignedVariableInteger
Tick
Server-side tick counter, wrapping at u16::MAX.
UnsignedFloat
UnsignedInteger
UnsignedVariableFloat
UnsignedVariableInteger

Derive Macros§

Channel
Derives the Channel trait for a given struct
Message
Derives the Message trait for a given struct, for the Bevy adapter
Replicate
Derives the Replicate trait for a given struct, for the Bevy adapter. Users add their own #[derive(Component)] alongside this derive, so we skip auto-emitting a Bevy Component impl here.
Serde