Struct valence_entity::tracked_data::TrackedData
source · pub struct TrackedData { /* private fields */ }
Expand description
Cache for all the tracked data of an entity. Used for the
EntityTrackerUpdateS2c
packet.
Implementations§
source§impl TrackedData
impl TrackedData
sourcepub fn init_data(&self) -> Option<&[u8]>
pub fn init_data(&self) -> Option<&[u8]>
Returns initial tracked data for the entity, ready to be sent in the
EntityTrackerUpdateS2c
packet. This is used when the entity
enters the view of a client.
sourcepub fn update_data(&self) -> Option<&[u8]>
pub fn update_data(&self) -> Option<&[u8]>
Contains updated tracked data for the entity, ready to be sent in the
EntityTrackerUpdateS2c
packet. This is used when tracked
data is changed and the client is already in view of the entity.
pub fn insert_init_value<V: Encode>(&mut self, index: u8, type_id: u8, value: V)
pub fn remove_init_value(&mut self, index: u8) -> bool
pub fn append_update_value<V: Encode>( &mut self, index: u8, type_id: u8, value: V, )
pub fn clear_update_values(&mut self)
Trait Implementations§
source§impl Component for TrackedData
impl Component for TrackedData
source§const STORAGE_TYPE: StorageType = bevy_ecs::component::StorageType::Table
const STORAGE_TYPE: StorageType = bevy_ecs::component::StorageType::Table
A constant indicating the storage type used for this component.
§fn register_component_hooks(_hooks: &mut ComponentHooks)
fn register_component_hooks(_hooks: &mut ComponentHooks)
Called when registering this component, allowing mutable access to its [
ComponentHooks
].source§impl Debug for TrackedData
impl Debug for TrackedData
source§impl Default for TrackedData
impl Default for TrackedData
source§fn default() -> TrackedData
fn default() -> TrackedData
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TrackedData
impl RefUnwindSafe for TrackedData
impl Send for TrackedData
impl Sync for TrackedData
impl Unpin for TrackedData
impl UnwindSafe for TrackedData
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
§impl<C> Bundle for Cwhere
C: Component,
impl<C> Bundle for Cwhere
C: Component,
fn component_ids( components: &mut Components, storages: &mut Storages, ids: &mut impl FnMut(ComponentId), )
unsafe fn from_components<T, F>(ctx: &mut T, func: &mut F) -> C
§fn get_component_ids(
components: &Components,
ids: &mut impl FnMut(Option<ComponentId>),
)
fn get_component_ids( components: &Components, ids: &mut impl FnMut(Option<ComponentId>), )
Gets this [
Bundle
]’s component ids. This will be None
if the component has not been registered.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§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
.§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
.§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.§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.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<C> DynamicBundle for Cwhere
C: Component,
impl<C> DynamicBundle for Cwhere
C: Component,
fn get_components(self, func: &mut impl FnMut(StorageType, OwningPtr<'_>))
§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates
Self
using data from the given [World
].