pub struct ItemEntity {
base: EntityBase,
entity_type: EntityTypeRef,
entity_data: SyncMutex<ItemEntityData>,
item_state: SyncMutex<ItemEntityState>,
}Expand description
A dropped item entity.
Mirrors vanilla’s ItemEntity behavior:
- Falls with gravity (0.04 per tick)
- Applies friction when on ground (0.98)
- Despawns after 5 minutes (6000 ticks)
- Has pickup delay before players can collect it
Fields§
§base: EntityBaseCommon entity fields (id, uuid, position, etc.).
entity_type: EntityTypeRefVanilla entity type registered for this implementation.
entity_data: SyncMutex<ItemEntityData>Entity data containing the ItemStack.
item_state: SyncMutex<ItemEntityState>Item-specific mutable state.
Implementations§
Source§impl ItemEntity
impl ItemEntity
Sourcepub fn new(
entity_type: EntityTypeRef,
id: i32,
position: DVec3,
world: Weak<World>,
) -> Self
pub fn new( entity_type: EntityTypeRef, id: i32, position: DVec3, world: Weak<World>, ) -> Self
Creates a new item entity with an empty item.
Use set_item() to set the actual item after creation, or use with_item().
Sourcepub fn with_item(
entity_type: EntityTypeRef,
id: i32,
position: DVec3,
item: ItemStack,
world: Weak<World>,
) -> Self
pub fn with_item( entity_type: EntityTypeRef, id: i32, position: DVec3, item: ItemStack, world: Weak<World>, ) -> Self
Creates a new item entity with the specified item.
Sourcepub fn with_item_and_velocity(
entity_type: EntityTypeRef,
id: i32,
position: DVec3,
item: ItemStack,
velocity: DVec3,
world: Weak<World>,
) -> Self
pub fn with_item_and_velocity( entity_type: EntityTypeRef, id: i32, position: DVec3, item: ItemStack, velocity: DVec3, world: Weak<World>, ) -> Self
Creates a new item entity with the specified item and initial velocity.
Mirrors vanilla’s ItemEntity(Level, double, double, double, ItemStack, double, double, double).
fn default_spawn_velocity() -> DVec3
Sourcepub fn from_saved(entity_type: EntityTypeRef, load: EntityBaseLoad) -> Self
pub fn from_saved(entity_type: EntityTypeRef, load: EntityBaseLoad) -> Self
Creates an item entity from saved data with restored base state.
Used when loading entities from disk. Type-specific data (item, age, etc.)
is restored via load_additional() after this constructor.
Sourcepub fn make_fake_item(&self)
pub fn make_fake_item(&self)
Makes this a one-tick visual pickup item that cannot be collected.
Sourcepub fn get_pickup_delay(&self) -> i32
pub fn get_pickup_delay(&self) -> i32
Gets the pickup delay in ticks.
Sourcepub fn set_default_pickup_delay(&self)
pub fn set_default_pickup_delay(&self)
Sets the default pickup delay (10 ticks = 0.5 seconds).
Sourcepub fn set_no_pickup_delay(&self)
pub fn set_no_pickup_delay(&self)
Sets the pickup delay to zero (immediately pickupable).
Sourcepub fn set_pickup_delay(&self, delay: i32)
pub fn set_pickup_delay(&self, delay: i32)
Sets a custom pickup delay in ticks.
Sourcepub fn has_pickup_delay(&self) -> bool
pub fn has_pickup_delay(&self) -> bool
Returns true if the item has a pickup delay (cannot be picked up yet).
Sourcepub fn get_health(&self) -> i32
pub fn get_health(&self) -> i32
Gets the health (damage resistance).
Sourcepub fn set_health(&self, health: i32)
pub fn set_health(&self, health: i32)
Sets the health.
Sourcepub fn set_thrower(&self, uuid: Uuid)
pub fn set_thrower(&self, uuid: Uuid)
Sets the entity that threw/dropped this item.
Sourcepub fn get_thrower(&self) -> Option<Uuid>
pub fn get_thrower(&self) -> Option<Uuid>
Gets the UUID of the entity that threw/dropped this item.
Sourcepub fn set_owner(&self, uuid: Option<Uuid>)
pub fn set_owner(&self, uuid: Option<Uuid>)
Sets the owner (the only entity that can pick up this item).
Pass None to allow any player to pick it up.
Vanilla calls this target.
Sourcepub fn get_owner(&self) -> Option<Uuid>
pub fn get_owner(&self) -> Option<Uuid>
Gets the owner UUID (the only entity that can pick up this item).
Returns None if any player can pick it up.
Sourcepub fn try_pickup(&self, player: &Arc<Player>) -> bool
pub fn try_pickup(&self, player: &Arc<Player>) -> bool
Attempts to have a player pick up this item.
Returns true if the item was fully picked up (and the entity should be removed),
false if pickup failed or was only partial.
Mirrors vanilla’s ItemEntity.playerTouch(Player).
Sourcepub fn is_mergeable(&self) -> bool
pub fn is_mergeable(&self) -> bool
Returns true if this item entity can be merged with others.
Mirrors vanilla’s ItemEntity.isMergeable().
An item is mergeable if:
- It’s not removed
- It doesn’t have infinite pickup delay (32767)
- It doesn’t have infinite lifetime (-32768)
- Its age is less than the despawn threshold (6000)
- Its count is less than max stack size
Sourcepub fn are_mergeable(this_stack: &ItemStack, other_stack: &ItemStack) -> bool
pub fn are_mergeable(this_stack: &ItemStack, other_stack: &ItemStack) -> bool
Checks if two item stacks can be merged together.
Mirrors vanilla’s ItemEntity.areMergeable().
Returns true if the items are the same type with the same components,
and their combined count wouldn’t exceed max stack size.
Sourcefn try_to_merge(&self, other: &Self)
fn try_to_merge(&self, other: &Self)
Attempts to merge with another item entity.
Mirrors vanilla’s ItemEntity.tryToMerge().
The item with fewer items is merged into the one with more.
Sourcefn merge_stacks(
to_item: &Self,
to_stack: &ItemStack,
from_item: &Self,
from_stack: &ItemStack,
)
fn merge_stacks( to_item: &Self, to_stack: &ItemStack, from_item: &Self, from_stack: &ItemStack, )
Merges the from_item’s stack into the to_item’s stack.
Mirrors vanilla’s ItemEntity.merge(ItemEntity, ItemStack, ItemEntity, ItemStack).
Sourcepub fn merge_with_neighbors(&self, world: &Arc<World>)
pub fn merge_with_neighbors(&self, world: &Arc<World>)
Attempts to merge this item with nearby item entities.
Mirrors vanilla’s ItemEntity.mergeWithNeighbors().
Searches for other mergeable item entities within 0.5 blocks horizontally
and attempts to merge with them.
fn apply_fluid_movement_or_gravity(&self)
fn apply_fluid_movement(&self, horizontal_drag: f64)
Trait Implementations§
Source§impl DowncastType for ItemEntity
impl DowncastType for ItemEntity
Source§const TYPE_KEY: DowncastTypeKey
const TYPE_KEY: DowncastTypeKey
Source§impl Entity for ItemEntity
impl Entity for ItemEntity
Source§fn base(&self) -> &EntityBase
fn base(&self) -> &EntityBase
Source§fn entity_type(&self) -> EntityTypeRef
fn entity_type(&self) -> EntityTypeRef
Source§fn get_default_gravity(&self) -> f64
fn get_default_gravity(&self) -> f64
Source§fn synced_data(&self) -> Option<&dyn EntitySyncedData>
fn synced_data(&self) -> Option<&dyn EntitySyncedData>
Source§fn block_pos_below_that_affects_movement(&self) -> Option<BlockPos>
fn block_pos_below_that_affects_movement(&self) -> Option<BlockPos>
Source§fn attackable(&self) -> bool
fn attackable(&self) -> bool
Source§fn should_play_lava_hurt_sound(&self) -> bool
fn should_play_lava_hurt_sound(&self) -> bool
Source§fn fire_immune(&self) -> bool
fn fire_immune(&self) -> bool
Source§fn player_touch(self: Arc<Self>, player: &Arc<Player>)
fn player_touch(self: Arc<Self>, player: &Arc<Player>)
Source§fn hurt(&self, _world: &World, source: &DamageSource, amount: f32) -> bool
fn hurt(&self, _world: &World, source: &DamageSource, amount: f32) -> bool
Source§fn save_additional(&self, nbt: &mut NbtCompound)
fn save_additional(&self, nbt: &mut NbtCompound)
Source§fn load_additional(&self, nbt: BorrowedNbtCompoundView<'_, '_>)
fn load_additional(&self, nbt: BorrowedNbtCompoundView<'_, '_>)
Source§fn is_always_ticking(&self) -> bool
fn is_always_ticking(&self) -> bool
Source§fn broadcast_to_player(&self, _player: &Player) -> bool
fn broadcast_to_player(&self, _player: &Player) -> bool
Source§fn scoreboard_name(&self) -> String
fn scoreboard_name(&self) -> String
Source§fn name(&self) -> TextComponent
fn name(&self) -> TextComponent
Source§fn display_name(&self) -> TextComponent
fn display_name(&self) -> TextComponent
Source§fn plain_text_name(&self) -> String
fn plain_text_name(&self) -> String
Source§fn nbt_for_data_compare(&self) -> NbtCompound
fn nbt_for_data_compare(&self) -> NbtCompound
Source§fn nbt_for_passenger_save(&self) -> Option<NbtCompound>
fn nbt_for_passenger_save(&self) -> Option<NbtCompound>
Source§fn spawn_position(&self) -> DVec3
fn spawn_position(&self) -> DVec3
Source§fn block_position(&self) -> BlockPos
fn block_position(&self) -> BlockPos
Source§fn in_block_state(&self, world: &World) -> BlockStateId
fn in_block_state(&self, world: &World) -> BlockStateId
Entity.getInBlockState.Source§fn old_position(&self) -> DVec3
fn old_position(&self) -> DVec3
Source§fn bounding_box(&self) -> WorldAabb
fn bounding_box(&self) -> WorldAabb
Source§fn is_free(&self, delta: DVec3) -> bool
fn is_free(&self, delta: DVec3) -> bool
Entity.isFree() for the current bounding box shifted by delta.Source§fn blocks_building(&self) -> bool
fn blocks_building(&self) -> bool
Source§fn is_pickable(&self) -> bool
fn is_pickable(&self) -> bool
Source§fn skip_attack_interaction(&self, _source: &dyn Entity) -> bool
fn skip_attack_interaction(&self, _source: &dyn Entity) -> bool
Source§fn is_pushable(&self) -> bool
fn is_pushable(&self) -> bool
Source§fn is_pushed_by_fluid(&self) -> bool
fn is_pushed_by_fluid(&self) -> bool
Source§fn on_above_bubble_column(&self, drag_down: bool, _pos: BlockPos)
fn on_above_bubble_column(&self, drag_down: bool, _pos: BlockPos)
Entity.onAboveBubbleColumn.Source§fn on_inside_bubble_column(&self, drag_down: bool)
fn on_inside_bubble_column(&self, drag_down: bool)
Entity.onInsideBubbleColumn.Source§fn is_spectator(&self) -> bool
fn is_spectator(&self) -> bool
Source§fn is_ignoring_block_triggers(&self) -> bool
fn is_ignoring_block_triggers(&self) -> bool
Source§fn piston_push_reaction(&self) -> PushReaction
fn piston_push_reaction(&self) -> PushReaction
Source§fn is_supported_by(&self, pos: BlockPos) -> bool
fn is_supported_by(&self, pos: BlockPos) -> bool
pos.Source§fn can_interact_with_level(&self) -> bool
fn can_interact_with_level(&self) -> bool
Source§fn is_invisible(&self) -> bool
fn is_invisible(&self) -> bool
Entity.isInvisible().Source§fn is_discrete(&self) -> bool
fn is_discrete(&self) -> bool
Entity.isDiscrete().Source§fn is_allied_to(&self, _other: &dyn Entity) -> bool
fn is_allied_to(&self, _other: &dyn Entity) -> bool
other.Source§fn is_marker_armor_stand(&self) -> bool
fn is_marker_armor_stand(&self) -> bool
Source§fn is_tame_owned_by(&self, _owner: &dyn LivingEntity) -> bool
fn is_tame_owned_by(&self, _owner: &dyn LivingEntity) -> bool
owner.Source§fn projectile_owner_uuid(&self) -> Option<Uuid>
fn projectile_owner_uuid(&self) -> Option<Uuid>
Projectile owner UUID when this entity exposes one.Source§fn projectile_owner(&self) -> Option<SharedEntity>
fn projectile_owner(&self) -> Option<SharedEntity>
Projectile owner when this entity exposes one.Source§fn is_flying_player(&self) -> bool
fn is_flying_player(&self) -> bool
flying set.Source§fn can_be_collided_with(&self, _other: Option<&dyn Entity>) -> bool
fn can_be_collided_with(&self, _other: Option<&dyn Entity>) -> bool
other can collide with this entity. Read moreSource§fn can_be_hit_by_projectile(&self) -> bool
fn can_be_hit_by_projectile(&self) -> bool
Source§fn deflection(&self, _projectile: &dyn Projectile) -> ProjectileDeflection
fn deflection(&self, _projectile: &dyn Projectile) -> ProjectileDeflection
Source§fn vehicle(&self) -> Option<SharedEntity>
fn vehicle(&self) -> Option<SharedEntity>
Source§fn controlled_vehicle(&self) -> Option<SharedEntity>
fn controlled_vehicle(&self) -> Option<SharedEntity>
Source§fn is_passenger(&self) -> bool
fn is_passenger(&self) -> bool
Source§fn can_ride(&self, _vehicle: &dyn Entity) -> bool
fn can_ride(&self, _vehicle: &dyn Entity) -> bool
vehicle. Read moreSource§fn stop_riding(&self)
fn stop_riding(&self)
Source§fn start_riding(&self, entity_to_ride: &SharedEntity) -> bool
fn start_riding(&self, entity_to_ride: &SharedEntity) -> bool
entity_to_ride if vanilla boarding rules allow it. Read moreSource§fn passengers(&self) -> Vec<SharedEntity> ⓘ
fn passengers(&self) -> Vec<SharedEntity> ⓘ
Source§fn count_player_passengers(&self) -> usize
fn count_player_passengers(&self) -> usize
Source§fn has_exactly_one_player_passenger(&self) -> bool
fn has_exactly_one_player_passenger(&self) -> bool
Source§fn first_passenger(&self) -> Option<SharedEntity>
fn first_passenger(&self) -> Option<SharedEntity>
Source§fn controlling_passenger(&self) -> Option<SharedEntity>
fn controlling_passenger(&self) -> Option<SharedEntity>
Source§fn can_control_vehicle(&self) -> bool
fn can_control_vehicle(&self) -> bool
Source§fn has_controlling_passenger(&self) -> bool
fn has_controlling_passenger(&self) -> bool
Source§fn is_vehicle(&self) -> bool
fn is_vehicle(&self) -> bool
Source§fn dismounts_underwater(&self) -> bool
fn dismounts_underwater(&self) -> bool
Entity.dismountsUnderwater.Source§fn has_passenger(&self, passenger: &dyn Entity) -> bool
fn has_passenger(&self, passenger: &dyn Entity) -> bool
passenger is a direct passenger of this entity. Read moreSource§fn can_add_passenger(&self, _passenger: &dyn Entity) -> bool
fn can_add_passenger(&self, _passenger: &dyn Entity) -> bool
passenger as a direct passenger. Read moreSource§fn could_accept_passenger(&self) -> bool
fn could_accept_passenger(&self) -> bool
Source§fn passenger_index(&self, passenger: &dyn Entity) -> Option<usize>
fn passenger_index(&self, passenger: &dyn Entity) -> Option<usize>
Source§fn vehicle_attachment_point(&self, _vehicle: &dyn Entity) -> DVec3
fn vehicle_attachment_point(&self, _vehicle: &dyn Entity) -> DVec3
Source§fn passenger_attachment_point(&self, passenger: &dyn Entity) -> DVec3
fn passenger_attachment_point(&self, passenger: &dyn Entity) -> DVec3
Source§fn passenger_riding_position(&self, passenger: &dyn Entity) -> DVec3
fn passenger_riding_position(&self, passenger: &dyn Entity) -> DVec3
passenger should ride this vehicle. Read moreSource§fn position_rider(&self, passenger: &dyn Entity)
fn position_rider(&self, passenger: &dyn Entity)
Source§fn root_vehicle_id(&self) -> i32
fn root_vehicle_id(&self) -> i32
Source§fn root_vehicle(&self) -> Option<SharedEntity>
fn root_vehicle(&self) -> Option<SharedEntity>
Source§fn is_passenger_of_same_vehicle(&self, other: &dyn Entity) -> bool
fn is_passenger_of_same_vehicle(&self, other: &dyn Entity) -> bool
other share the same root vehicle. Read moreSource§fn has_indirect_passenger(&self, entity: &dyn Entity) -> bool
fn has_indirect_passenger(&self, entity: &dyn Entity) -> bool
entity is an indirect passenger of this entity. Read moreSource§fn can_collide_with(&self, other: &dyn Entity) -> bool
fn can_collide_with(&self, other: &dyn Entity) -> bool
other. Read moreSource§fn push_impulse(&self, impulse: DVec3)
fn push_impulse(&self, impulse: DVec3)
Source§fn push_entity(&self, entity: &dyn Entity)
fn push_entity(&self, entity: &dyn Entity)
Source§fn make_bounding_box_at(&self, position: DVec3) -> WorldAabb
fn make_bounding_box_at(&self, position: DVec3) -> WorldAabb
position.Source§fn get_relative_portal_position(
&self,
axis: Axis,
portal_area: FoundRectangle,
) -> DVec3
fn get_relative_portal_position( &self, axis: Axis, portal_area: FoundRectangle, ) -> DVec3
Entity.getRelativePortalPosition.Source§fn default_tick(&self)
fn default_tick(&self)
Entity.tick() behavior. Read moreSource§fn ride_tick(&self)
fn ride_tick(&self)
Source§fn handle_portal(&self)
fn handle_portal(&self)
Entity.handlePortal behavior currently implemented by Steel.Source§fn entity_base_tick(&self)
fn entity_base_tick(&self)
Entity.baseTick behavior. Read moreSource§fn check_below_world(&self)
fn check_below_world(&self)
Source§fn on_below_world(&self)
fn on_below_world(&self)
Source§fn check_despawn(&self)
fn check_despawn(&self)
Source§fn apply_inside_block_effect(&self, effect_type: InsideBlockEffectType)
fn apply_inside_block_effect(&self, effect_type: InsideBlockEffectType)
Source§fn pack_dirty_entity_data(&self) -> Option<Vec<DataValue>>
fn pack_dirty_entity_data(&self) -> Option<Vec<DataValue>>
Source§fn pack_all_entity_data(&self) -> Vec<DataValue>
fn pack_all_entity_data(&self) -> Vec<DataValue>
Source§fn update_data_before_sync(&self)
fn update_data_before_sync(&self)
Source§fn is_removed(&self) -> bool
fn is_removed(&self) -> bool
Source§fn is_alive(&self) -> bool
fn is_alive(&self) -> bool
Source§fn begin_pending_world_change(&self) -> Option<PendingWorldChangeToken>
fn begin_pending_world_change(&self) -> Option<PendingWorldChangeToken>
Source§fn finish_pending_world_change(&self, token: PendingWorldChangeToken) -> bool
fn finish_pending_world_change(&self, token: PendingWorldChangeToken) -> bool
Source§fn is_world_change_pending(&self) -> bool
fn is_world_change_pending(&self) -> bool
Source§fn is_world_change_token_pending(&self, token: PendingWorldChangeToken) -> bool
fn is_world_change_token_pending(&self, token: PendingWorldChangeToken) -> bool
Source§fn can_use_portal(&self, ignore_passenger: bool) -> bool
fn can_use_portal(&self, ignore_passenger: bool) -> bool
Source§fn dimension_changing_delay(&self) -> i32
fn dimension_changing_delay(&self) -> i32
Source§fn removal_reason(&self) -> Option<RemovalReason>
fn removal_reason(&self) -> Option<RemovalReason>
Source§fn set_removed(&self, reason: RemovalReason)
fn set_removed(&self, reason: RemovalReason)
Source§fn game_event(&self, event: GameEventRef)
fn game_event(&self, event: GameEventRef)
Source§fn kill(&self, world: &World)
fn kill(&self, world: &World)
Source§fn restore_owner_reference(&self, _owner: &SharedEntity)
fn restore_owner_reference(&self, _owner: &SharedEntity)
Source§fn set_level_callback(&self, callback: Arc<dyn EntityLevelCallback>)
fn set_level_callback(&self, callback: Arc<dyn EntityLevelCallback>)
Source§fn notify_leash_holder(&self, _leashable: &dyn Entity)
fn notify_leash_holder(&self, _leashable: &dyn Entity)
Source§fn notify_leashee_removed(&self, _leashable: &dyn Entity)
fn notify_leashee_removed(&self, _leashable: &dyn Entity)
Source§fn leashables_leashed_to(&self) -> Vec<SharedEntity> ⓘ
fn leashables_leashed_to(&self) -> Vec<SharedEntity> ⓘ
Source§fn leashables_leashed_to_holder_in_area(
&self,
holder: &dyn Entity,
) -> Vec<SharedEntity> ⓘ
fn leashables_leashed_to_holder_in_area( &self, holder: &dyn Entity, ) -> Vec<SharedEntity> ⓘ
holder.Source§fn transfer_leashables_from_holder(&self, old_holder: &dyn Entity) -> bool
fn transfer_leashables_from_holder(&self, old_holder: &dyn Entity) -> bool
old_holder to this entity.Source§fn drop_all_leash_connections(&self, player: Option<&Player>) -> bool
fn drop_all_leash_connections(&self, player: Option<&Player>) -> bool
Source§fn shear_off_all_leash_connections(&self, player: Option<&Player>) -> bool
fn shear_off_all_leash_connections(&self, player: Option<&Player>) -> bool
Source§fn attempt_to_shear_equipment(
&self,
player: &Player,
hand: InteractionHand,
) -> bool
fn attempt_to_shear_equipment( &self, player: &Player, hand: InteractionHand, ) -> bool
Entity.attemptToShearEquipment.Source§fn interact(
&self,
player: &Player,
hand: InteractionHand,
location: DVec3,
) -> InteractionResult
fn interact( &self, player: &Player, hand: InteractionHand, location: DVec3, ) -> InteractionResult
Source§fn interact_entity(
&self,
player: &Player,
hand: InteractionHand,
_location: DVec3,
) -> InteractionResult
fn interact_entity( &self, player: &Player, hand: InteractionHand, _location: DVec3, ) -> InteractionResult
Entity.interact behavior.Source§fn is_living_entity(&self) -> bool
fn is_living_entity(&self) -> bool
Source§fn is_abstract_arrow(&self) -> bool
fn is_abstract_arrow(&self) -> bool
AbstractArrow hierarchy.Source§fn as_projectile(&self) -> Option<&dyn Projectile>
fn as_projectile(&self) -> Option<&dyn Projectile>
Source§fn as_living_entity(&self) -> Option<&dyn LivingEntity>
fn as_living_entity(&self) -> Option<&dyn LivingEntity>
Source§fn as_item_frame(&self) -> Option<&dyn ItemFrame>
fn as_item_frame(&self) -> Option<&dyn ItemFrame>
Source§fn as_player(&self) -> Option<&Player>
fn as_player(&self) -> Option<&Player>
Source§fn with_weapon_item(&self, visitor: &mut dyn FnMut(Option<&ItemStack>))
fn with_weapon_item(&self, visitor: &mut dyn FnMut(Option<&ItemStack>))
Entity.getWeaponItem without copying inventory state.Source§fn is_pathfinder_mob(&self) -> bool
fn is_pathfinder_mob(&self) -> bool
Source§fn as_pathfinder_mob(&self) -> Option<&dyn PathfinderMob>
fn as_pathfinder_mob(&self) -> Option<&dyn PathfinderMob>
Source§fn as_mob(&self) -> Option<&dyn Mob>
fn as_mob(&self) -> Option<&dyn Mob>
Source§fn as_animal(&self) -> Option<&dyn Animal>
fn as_animal(&self) -> Option<&dyn Animal>
Source§fn is_ageable_mob(&self) -> bool
fn is_ageable_mob(&self) -> bool
Source§fn as_ageable_mob(&self) -> Option<&dyn AgeableMob>
fn as_ageable_mob(&self) -> Option<&dyn AgeableMob>
Source§fn is_item_steerable(&self) -> bool
fn is_item_steerable(&self) -> bool
Source§fn as_item_steerable(&self) -> Option<&dyn ItemSteerable>
fn as_item_steerable(&self) -> Option<&dyn ItemSteerable>
Source§fn forces_fall_flying_velocity_sync(&self) -> bool
fn forces_fall_flying_velocity_sync(&self) -> bool
ServerEntity should force velocity sync for fall flying.Source§fn uses_client_movement_packets(&self) -> bool
fn uses_client_movement_packets(&self) -> bool
Source§fn is_server_driven_movement(&self) -> bool
fn is_server_driven_movement(&self) -> bool
Source§fn can_simulate_movement(&self) -> bool
fn can_simulate_movement(&self) -> bool
Source§fn is_effective_ai(&self) -> bool
fn is_effective_ai(&self) -> bool
Source§fn is_suppressing_bounce(&self) -> bool
fn is_suppressing_bounce(&self) -> bool
Source§fn is_stepping_carefully(&self) -> bool
fn is_stepping_carefully(&self) -> bool
Source§fn is_descending(&self) -> bool
fn is_descending(&self) -> bool
Source§fn update_swimming(&self)
fn update_swimming(&self)
Source§fn default_update_swimming(&self)
fn default_update_swimming(&self)
Entity.updateSwimming for player overrides.Source§fn is_flying_vehicle(&self) -> bool
fn is_flying_vehicle(&self) -> bool
Source§fn on_climbable(&self) -> bool
fn on_climbable(&self) -> bool
Source§fn known_movement(&self) -> DVec3
fn known_movement(&self) -> DVec3
Source§fn known_speed(&self) -> DVec3
fn known_speed(&self) -> DVec3
getKnownSpeed.Source§fn tick_count(&self) -> i32
fn tick_count(&self) -> i32
Entity.tickCount.Source§fn advance_tick_count(&self)
fn advance_tick_count(&self)
Entity.tickCount.Source§fn fall_sounds(&self) -> (SoundEventRef, SoundEventRef)
fn fall_sounds(&self) -> (SoundEventRef, SoundEventRef)
Source§fn rotation(&self) -> (f32, f32)
fn rotation(&self) -> (f32, f32)
Source§fn set_rotation(&self, rotation: (f32, f32))
fn set_rotation(&self, rotation: (f32, f32))
Source§fn direction_yaw(&self) -> Direction
fn direction_yaw(&self) -> Direction
Source§fn look_at(&self, from_anchor: EntityAnchor, target: DVec3)
fn look_at(&self, from_anchor: EntityAnchor, target: DVec3)
Source§fn look_at_entity(
&self,
from_anchor: EntityAnchor,
target: &dyn Entity,
target_anchor: EntityAnchor,
)
fn look_at_entity( &self, from_anchor: EntityAnchor, target: &dyn Entity, target_anchor: EntityAnchor, )
Source§fn spawn_data(&self) -> i32
fn spawn_data(&self) -> i32
Source§fn get_eye_height(&self) -> f64
fn get_eye_height(&self) -> f64
Source§fn get_fluid_jump_threshold(&self) -> f64
fn get_fluid_jump_threshold(&self) -> f64
Entity.getFluidJumpThreshold().Source§fn is_in_wall(&self) -> bool
fn is_in_wall(&self) -> bool
Entity.isInWall.Source§fn calculate_view_vector(&self, pitch_degrees: f32, yaw_degrees: f32) -> DVec3
fn calculate_view_vector(&self, pitch_degrees: f32, yaw_degrees: f32) -> DVec3
Entity.calculateViewVector().Source§fn look_angle(&self) -> DVec3
fn look_angle(&self) -> DVec3
Entity.getLookAngle().Source§fn hand_holding_item_angle(&self, item: ItemRef) -> DVec3
fn hand_holding_item_angle(&self, item: ItemRef) -> DVec3
item. Read moreSource§fn set_velocity(&self, velocity: DVec3)
fn set_velocity(&self, velocity: DVec3)
Source§fn needs_velocity_sync(&self) -> bool
fn needs_velocity_sync(&self) -> bool
ServerEntity should consider sending velocity.Source§fn mark_velocity_sync(&self)
fn mark_velocity_sync(&self)
ServerEntity synchronization.Source§fn clear_velocity_sync(&self)
fn clear_velocity_sync(&self)
Source§fn hurt_marked(&self) -> bool
fn hurt_marked(&self) -> bool
Source§fn clear_hurt_mark(&self)
fn clear_hurt_mark(&self)
Source§fn fall_distance(&self) -> f64
fn fall_distance(&self) -> f64
Source§fn is_in_powder_snow(&self) -> bool
fn is_in_powder_snow(&self) -> bool
Source§fn was_in_powder_snow(&self) -> bool
fn was_in_powder_snow(&self) -> bool
Source§fn set_fall_distance(&self, fall_distance: f64)
fn set_fall_distance(&self, fall_distance: f64)
Source§fn reset_fall_distance(&self)
fn reset_fall_distance(&self)
Source§fn check_fall_distance_accumulation(&self)
fn check_fall_distance_accumulation(&self)
Entity.checkFallDistanceAccumulation().Source§fn fire_freeze_state(&self) -> EntityFireFreezeState
fn fire_freeze_state(&self) -> EntityFireFreezeState
Source§fn remaining_fire_ticks(&self) -> i32
fn remaining_fire_ticks(&self) -> i32
remainingFireTicks.Source§fn set_remaining_fire_ticks(&self, remaining_fire_ticks: i32)
fn set_remaining_fire_ticks(&self, remaining_fire_ticks: i32)
remainingFireTicks.Source§fn ticks_frozen(&self) -> i32
fn ticks_frozen(&self) -> i32
TicksFrozen.Source§fn set_ticks_frozen(&self, ticks_frozen: i32)
fn set_ticks_frozen(&self, ticks_frozen: i32)
TicksFrozen.Source§fn fire_immune_ticks(&self) -> i32
fn fire_immune_ticks(&self) -> i32
Source§fn remaining_fire_ticks_cap(&self) -> Option<i32>
fn remaining_fire_ticks_cap(&self) -> Option<i32>
remainingFireTicks this entity can store.Source§fn fire_ignite_extra_ticks(&self) -> i32
fn fire_ignite_extra_ticks(&self) -> i32
Source§fn is_on_fire(&self) -> bool
fn is_on_fire(&self) -> bool
Source§fn has_visual_fire(&self) -> bool
fn has_visual_fire(&self) -> bool
hasVisualFire.Source§fn is_freezing(&self) -> bool
fn is_freezing(&self) -> bool
Source§fn default_can_freeze(&self) -> bool
fn default_can_freeze(&self) -> bool
Entity.canFreeze() without living-equipment overrides.Source§fn can_freeze(&self) -> bool
fn can_freeze(&self) -> bool
Source§fn ticks_required_to_freeze(&self) -> i32
fn ticks_required_to_freeze(&self) -> i32
getTicksRequiredToFreeze.Source§fn is_fully_frozen(&self) -> bool
fn is_fully_frozen(&self) -> bool
Source§fn percent_frozen(&self) -> f32
fn percent_frozen(&self) -> f32
Entity.getPercentFrozen.Source§fn clear_freeze(&self)
fn clear_freeze(&self)
Source§fn clear_fire(&self)
fn clear_fire(&self)
Source§fn ignite_for_ticks(&self, number_of_ticks: i32)
fn ignite_for_ticks(&self, number_of_ticks: i32)
Source§fn sync_base_fire_freeze_entity_data(&self)
fn sync_base_fire_freeze_entity_data(&self)
Source§fn sync_base_entity_data(&self)
fn sync_base_entity_data(&self)
Source§fn is_in_water(&self) -> bool
fn is_in_water(&self) -> bool
Source§fn is_in_lava(&self) -> bool
fn is_in_lava(&self) -> bool
Source§fn is_eye_in_water(&self) -> bool
fn is_eye_in_water(&self) -> bool
Source§fn is_eye_in_lava(&self) -> bool
fn is_eye_in_lava(&self) -> bool
Source§fn is_under_water(&self) -> bool
fn is_under_water(&self) -> bool
Source§fn fluid_contact(&self) -> EntityFluidContact
fn fluid_contact(&self) -> EntityFluidContact
Source§fn refresh_fluid_contact(&self) -> EntityFluidContact
fn refresh_fluid_contact(&self) -> EntityFluidContact
Source§fn refresh_fluid_contact_for_base_tick(&self) -> EntityFluidContact
fn refresh_fluid_contact_for_base_tick(&self) -> EntityFluidContact
Source§fn scan_and_store_fluid_contact(
&self,
advance_eye_water_history: bool,
) -> EntityFluidContact
fn scan_and_store_fluid_contact( &self, advance_eye_water_history: bool, ) -> EntityFluidContact
Source§fn apply_fluid_current_for_base_tick(
&self,
world: &Arc<World>,
contact: EntityFluidContact,
)
fn apply_fluid_current_for_base_tick( &self, world: &Arc<World>, contact: EntityFluidContact, )
Source§fn apply_fluid_current_impulse(&self, impulse: DVec3)
fn apply_fluid_current_impulse(&self, impulse: DVec3)
Source§fn is_fall_damage_immune(&self) -> bool
fn is_fall_damage_immune(&self) -> bool
Source§fn propagate_fall_to_passengers(
&self,
fall_distance: f64,
damage_modifier: f32,
source: &DamageSource,
)
fn propagate_fall_to_passengers( &self, fall_distance: f64, damage_modifier: f32, source: &DamageSource, )
Source§fn cause_fall_damage(
&self,
fall_distance: f64,
damage_modifier: f32,
source: &DamageSource,
) -> bool
fn cause_fall_damage( &self, fall_distance: f64, damage_modifier: f32, source: &DamageSource, ) -> bool
Source§fn horizontal_collision(&self) -> bool
fn horizontal_collision(&self) -> bool
Source§fn vertical_collision(&self) -> bool
fn vertical_collision(&self) -> bool
Source§fn vertical_collision_below(&self) -> bool
fn vertical_collision_below(&self) -> bool
Source§fn no_physics(&self) -> bool
fn no_physics(&self) -> bool
Source§fn is_affected_by_blocks(&self) -> bool
fn is_affected_by_blocks(&self) -> bool
Source§fn set_no_physics(&self, no_physics: bool)
fn set_no_physics(&self, no_physics: bool)
Source§fn update_no_physics_from_current_collision(&self)
fn update_no_physics_from_current_collision(&self)
noPhysics from the entity’s current collision state.Source§fn move_towards_closest_space(&self, x: f64, y: f64, z: f64)
fn move_towards_closest_space(&self, x: f64, y: f64, z: f64)
Source§fn default_make_stuck_in_block(
&self,
_state: BlockStateId,
speed_multiplier: DVec3,
)
fn default_make_stuck_in_block( &self, _state: BlockStateId, speed_multiplier: DVec3, )
Source§fn make_stuck_in_block(&self, state: BlockStateId, speed_multiplier: DVec3)
fn make_stuck_in_block(&self, state: BlockStateId, speed_multiplier: DVec3)
Source§fn apply_effects_from_blocks(&self)
fn apply_effects_from_blocks(&self)
Source§fn apply_effects_from_blocks_between(&self, from: DVec3, to: DVec3)
fn apply_effects_from_blocks_between(&self, from: DVec3, to: DVec3)
Source§fn apply_effects_from_blocks_for_last_movements(&self)
fn apply_effects_from_blocks_for_last_movements(&self)
Source§fn set_on_ground(&self, on_ground: bool)
fn set_on_ground(&self, on_ground: bool)
Source§fn set_on_ground_with_movement(
&self,
on_ground: bool,
horizontal_collision: bool,
movement: DVec3,
)
fn set_on_ground_with_movement( &self, on_ground: bool, horizontal_collision: bool, movement: DVec3, )
Source§fn default_apply_accepted_client_movement(
&self,
world: &Arc<World>,
accepted: AcceptedClientMovement,
) -> Result<AcceptedClientMovementOutcome, EntityMoveError>
fn default_apply_accepted_client_movement( &self, world: &Arc<World>, accepted: AcceptedClientMovement, ) -> Result<AcceptedClientMovementOutcome, EntityMoveError>
Source§fn apply_accepted_client_movement(
&self,
world: &Arc<World>,
accepted: AcceptedClientMovement,
) -> Result<AcceptedClientMovementOutcome, EntityMoveError>
fn apply_accepted_client_movement( &self, world: &Arc<World>, accepted: AcceptedClientMovement, ) -> Result<AcceptedClientMovementOutcome, EntityMoveError>
Source§fn apply_accepted_client_vehicle_movement(
&self,
world: &Arc<World>,
accepted: AcceptedClientMovement,
) -> Result<AcceptedClientMovementOutcome, EntityMoveError>
fn apply_accepted_client_vehicle_movement( &self, world: &Arc<World>, accepted: AcceptedClientMovement, ) -> Result<AcceptedClientMovementOutcome, EntityMoveError>
Source§fn try_set_position(&self, pos: DVec3) -> Result<(), EntityMoveError>
fn try_set_position(&self, pos: DVec3) -> Result<(), EntityMoveError>
Source§fn set_old_position_to_current(&self)
fn set_old_position_to_current(&self)
Source§fn set_old_position(&self, old_position: DVec3)
fn set_old_position(&self, old_position: DVec3)
Source§fn remove_latest_movement_recording(&self)
fn remove_latest_movement_recording(&self)
Source§fn on_pos(&self, offset: f32) -> Option<BlockPos>
fn on_pos(&self, offset: f32) -> Option<BlockPos>
Source§fn on_pos_legacy(&self) -> Option<BlockPos>
fn on_pos_legacy(&self) -> Option<BlockPos>
getOnPosLegacy(), used by fall/step block hooks.Source§fn block_speed_factor(&self) -> f32
fn block_speed_factor(&self) -> f32
Source§fn block_jump_factor(&self) -> f32
fn block_jump_factor(&self) -> f32
Entity.getBlockJumpFactor().Source§fn dimensions_for_pose(&self, _pose: EntityPose) -> EntityDimensions
fn dimensions_for_pose(&self, _pose: EntityPose) -> EntityDimensions
Source§fn refresh_dimensions(&self)
fn refresh_dimensions(&self)
Source§fn is_crouching(&self) -> bool
fn is_crouching(&self) -> bool
Source§fn is_swimming(&self) -> bool
fn is_swimming(&self) -> bool
Source§fn is_on_rails(&self) -> bool
fn is_on_rails(&self) -> bool
Source§fn is_state_climbable(&self, state: BlockStateId) -> bool
fn is_state_climbable(&self, state: BlockStateId) -> bool
Source§fn movement_emission(&self) -> EntityMovementEmission
fn movement_emission(&self) -> EntityMovementEmission
Source§fn may_interact(&self, _world: &World, _pos: BlockPos) -> bool
fn may_interact(&self, _world: &World, _pos: BlockPos) -> bool
Source§fn air_supply(&self) -> i32
fn air_supply(&self) -> i32
Air value.Source§fn set_air_supply(&self, air_supply: i32)
fn set_air_supply(&self, air_supply: i32)
Air value.Source§fn max_air_supply(&self) -> i32
fn max_air_supply(&self) -> i32
Source§fn portal_cooldown(&self) -> i32
fn portal_cooldown(&self) -> i32
Source§fn set_portal_cooldown(&self, portal_cooldown: i32)
fn set_portal_cooldown(&self, portal_cooldown: i32)
Source§fn is_on_portal_cooldown(&self) -> bool
fn is_on_portal_cooldown(&self) -> bool
Source§fn reset_portal_cooldown(&self)
fn reset_portal_cooldown(&self)
Source§fn set_as_inside_portal(&self, portal: PortalKind, entry_position: BlockPos)
fn set_as_inside_portal(&self, portal: PortalKind, entry_position: BlockPos)
Source§fn custom_name(&self) -> Option<TextComponent>
fn custom_name(&self) -> Option<TextComponent>
Source§fn set_custom_name(&self, custom_name: Option<TextComponent>)
fn set_custom_name(&self, custom_name: Option<TextComponent>)
Source§fn is_custom_name_visible(&self) -> bool
fn is_custom_name_visible(&self) -> bool
Source§fn set_custom_name_visible(&self, visible: bool)
fn set_custom_name_visible(&self, visible: bool)
Source§fn has_glowing_tag(&self) -> bool
fn has_glowing_tag(&self) -> bool
Source§fn set_glowing_tag(&self, glowing: bool)
fn set_glowing_tag(&self, glowing: bool)
Source§fn remove_tag(&self, tag: &str) -> bool
fn remove_tag(&self, tag: &str) -> bool
Source§fn custom_data(&self) -> NbtCompound
fn custom_data(&self) -> NbtCompound
Source§fn set_custom_data(&self, custom_data: NbtCompound)
fn set_custom_data(&self, custom_data: NbtCompound)
Source§fn sound_source(&self) -> SoundSource
fn sound_source(&self) -> SoundSource
Source§fn swim_sound(&self) -> SoundEventRef
fn swim_sound(&self) -> SoundEventRef
Source§fn set_silent(&self, silent: bool)
fn set_silent(&self, silent: bool)
Source§fn broadcast_entity_event(&self, event: EntityStatus)
fn broadcast_entity_event(&self, event: EntityStatus)
Source§fn play_sound(&self, sound: SoundEventRef, volume: f32, pitch: f32)
fn play_sound(&self, sound: SoundEventRef, volume: f32, pitch: f32)
Source§fn play_entity_on_fire_extinguished_sound(&self)
fn play_entity_on_fire_extinguished_sound(&self)
Source§fn play_step_sound(&self, _pos: BlockPos, block_state: BlockStateId)
fn play_step_sound(&self, _pos: BlockPos, block_state: BlockStateId)
Source§fn play_block_step_sound(&self, block_state: BlockStateId)
fn play_block_step_sound(&self, block_state: BlockStateId)
Source§fn play_muffled_step_sound(&self, block_state: BlockStateId)
fn play_muffled_step_sound(&self, block_state: BlockStateId)
Source§fn play_combination_step_sounds(
&self,
primary_step_sound: BlockStateId,
secondary_step_sound: BlockStateId,
)
fn play_combination_step_sounds( &self, primary_step_sound: BlockStateId, secondary_step_sound: BlockStateId, )
Source§fn walking_step_sound(&self, pos: BlockPos, block_state: BlockStateId)
fn walking_step_sound(&self, pos: BlockPos, block_state: BlockStateId)
Source§fn play_amethyst_step_sound(&self)
fn play_amethyst_step_sound(&self)
Source§fn water_swim_sound(&self)
fn water_swim_sound(&self)
Source§fn play_swim_sound(&self, volume: f32)
fn play_swim_sound(&self, volume: f32)
Source§fn is_flapping(&self) -> bool
fn is_flapping(&self) -> bool
Source§fn process_flapping_movement(&self)
fn process_flapping_movement(&self)
Source§fn next_step(&self) -> f32
fn next_step(&self) -> f32
Source§fn apply_movement_emission_and_play_sound(
&self,
emission: EntityMovementEmission,
clipped_movement: DVec3,
effect_pos: BlockPos,
effect_state: BlockStateId,
)
fn apply_movement_emission_and_play_sound( &self, emission: EntityMovementEmission, clipped_movement: DVec3, effect_pos: BlockPos, effect_state: BlockStateId, )
Source§fn apply_movement_side_effects_after_move(
&self,
world: &World,
actual_movement: DVec3,
)
fn apply_movement_side_effects_after_move( &self, world: &World, actual_movement: DVec3, )
Source§fn vibration_and_sound_effects_from_block(
&self,
pos: BlockPos,
block_state: BlockStateId,
should_sound: bool,
should_vibrate: bool,
clipped_movement: DVec3,
) -> bool
fn vibration_and_sound_effects_from_block( &self, pos: BlockPos, block_state: BlockStateId, should_sound: bool, should_vibrate: bool, clipped_movement: DVec3, ) -> bool
Source§fn max_up_step(&self) -> f32
fn max_up_step(&self) -> f32
Source§fn backs_off_from_edge(&self) -> bool
fn backs_off_from_edge(&self) -> bool
Source§fn is_no_gravity(&self) -> bool
fn is_no_gravity(&self) -> bool
Source§fn set_no_gravity(&self, no_gravity: bool)
fn set_no_gravity(&self, no_gravity: bool)
NoGravity flag.Source§fn is_invulnerable(&self) -> bool
fn is_invulnerable(&self) -> bool
Invulnerable flag.Source§fn set_invulnerable(&self, invulnerable: bool)
fn set_invulnerable(&self, invulnerable: bool)
Invulnerable flag.Source§fn get_gravity(&self) -> f64
fn get_gravity(&self) -> f64
Source§fn apply_gravity(&self)
fn apply_gravity(&self)
Source§fn move_relative(&self, speed: f32, input: DVec3)
fn move_relative(&self, speed: f32, input: DVec3)
Entity.moveRelative().Source§fn move_without_physics(&self, delta: DVec3) -> Option<MoveResult>
fn move_without_physics(&self, delta: DVec3) -> Option<MoveResult>
Source§fn move_entity(&self, mover_type: MoverType, delta: DVec3) -> Option<MoveResult>
fn move_entity(&self, mover_type: MoverType, delta: DVec3) -> Option<MoveResult>
Source§fn apply_fall_damage_after_move(
&self,
result: &MoveResult,
world: &Arc<World>,
) -> bool
fn apply_fall_damage_after_move( &self, result: &MoveResult, world: &Arc<World>, ) -> bool
Source§fn reset_fall_distance_on_resetting_clip(
&self,
world: &Arc<World>,
movement: DVec3,
)
fn reset_fall_distance_on_resetting_clip( &self, world: &Arc<World>, movement: DVec3, )
Source§fn do_check_fall_damage(
&self,
movement: DVec3,
on_ground: bool,
world: &Arc<World>,
) -> bool
fn do_check_fall_damage( &self, movement: DVec3, on_ground: bool, world: &Arc<World>, ) -> bool
Entity.doCheckFallDamage. Read moreSource§fn refresh_supporting_block_for_fall_damage(
&self,
movement: DVec3,
on_ground: bool,
)
fn refresh_supporting_block_for_fall_damage( &self, movement: DVec3, on_ground: bool, )
Source§fn check_fall_damage(
&self,
vertical_movement: f64,
on_ground: bool,
on_state: BlockStateId,
pos: BlockPos,
world: &Arc<World>,
)
fn check_fall_damage( &self, vertical_movement: f64, on_ground: bool, on_state: BlockStateId, pos: BlockPos, world: &Arc<World>, )
Entity.checkFallDamage.Source§fn ground_contact_after_movement(
&self,
on_ground: bool,
movement: Option<DVec3>,
) -> EntityGroundContact
fn ground_contact_after_movement( &self, on_ground: bool, movement: Option<DVec3>, ) -> EntityGroundContact
Source§fn check_supporting_block(
&self,
on_ground: bool,
movement: Option<DVec3>,
world: &Arc<World>,
) -> EntityGroundContact
fn check_supporting_block( &self, on_ground: bool, movement: Option<DVec3>, world: &Arc<World>, ) -> EntityGroundContact
Entity.checkSupportingBlock.Source§fn spawn_at_location(
&self,
item: ItemStack,
y_offset: f64,
) -> Option<Arc<ItemEntity>>
fn spawn_at_location( &self, item: ItemStack, y_offset: f64, ) -> Option<Arc<ItemEntity>>
Source§fn spawn_at_location_with_offset(
&self,
item: ItemStack,
offset: DVec3,
) -> Option<Arc<ItemEntity>>
fn spawn_at_location_with_offset( &self, item: ItemStack, offset: DVec3, ) -> Option<Arc<ItemEntity>>
Auto Trait Implementations§
impl !Freeze for ItemEntity
impl !RefUnwindSafe for ItemEntity
impl !UnwindSafe for ItemEntity
impl Send for ItemEntity
impl Sync for ItemEntity
impl Unpin for ItemEntity
impl UnsafeUnpin for ItemEntity
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
Source§impl<T> Downcast for Twhere
T: ErasedType + ?Sized,
impl<T> Downcast for Twhere
T: ErasedType + ?Sized,
Source§fn is<T>(&self) -> boolwhere
T: DowncastType,
fn is<T>(&self) -> boolwhere
T: DowncastType,
T.Source§fn downcast_ref<T>(&self) -> Option<&T>where
T: DowncastType,
fn downcast_ref<T>(&self) -> Option<&T>where
T: DowncastType,
T when its key matches.Source§fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: DowncastType,
fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: DowncastType,
T when its key matches.Source§impl<T> EntityEventSource for Twhere
T: Entity,
impl<T> EntityEventSource for Twhere
T: Entity,
Source§fn as_entity_event_source(&self) -> &(dyn Entity + 'static)
fn as_entity_event_source(&self) -> &(dyn Entity + 'static)
Source§impl<T> ErasedType for Twhere
T: DowncastType,
impl<T> ErasedType for Twhere
T: DowncastType,
fn downcast_type_key(&self) -> DowncastTypeKey
fn downcast_data(&self) -> *const ()
fn downcast_data_mut(&mut self) -> *mut ()
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreArc<SyncMutex<>>