Skip to main content

EntityMetadataEntryValue

Enum EntityMetadataEntryValue 

Source
#[non_exhaustive]
pub enum EntityMetadataEntryValue {
Show 44 variants Byte(i8), Int(i32), Long(i64), Float(f32), String(ByteString), Component(AnonNbt), OptionalComponent(Option<AnonNbt>), ItemStack(Slot), Boolean(bool), Rotations(EntityMetadataEntryValueRotations), BlockPos(BlockPos), OptionalBlockPos(Option<BlockPos>), Direction(i32), OptionalUuid(Option<Uuid>), BlockState(i32), OptionalBlockState(i32), Particle(Particle), Particles(Vec<Particle>), VillagerData(EntityMetadataEntryValueVillagerData), OptionalUnsignedInt(i32), Pose(i32), CatVariant(i32), CatSoundVariant(i32), CowVariant(i32), CowSoundVariant(i32), WolfVariant(i32), WolfSoundVariant(i32), FrogVariant(i32), PigVariant(i32), PigSoundVariant(i32), ChickenVariant(i32), ChickenSoundVariant(i32), ZombieNautilusVariant(i32), OptionalGlobalPos(Option<GlobalPos>), PaintingVariant(Holder<EntityMetadataPaintingVariant>), SnifferState(i32), ArmadilloState(i32), CopperGolemState(i32), WeatheringCopperGolemState(i32), Vector3(Vec3f), Quaternion(Vec4f), ResolvableProfile(ResolvableProfile), HumanoidArm(EntityMetadataEntryValueHumanoidArm), Other,
}
Expand description

Switch on type.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Byte(i8)

Case(s) byte.

§

Int(i32)

Case(s) int.

§

Long(i64)

Case(s) long.

§

Float(f32)

Case(s) float.

§

String(ByteString)

Case(s) string.

§

Component(AnonNbt)

Case(s) component.

§

OptionalComponent(Option<AnonNbt>)

Case(s) optional_component.

§

ItemStack(Slot)

Case(s) item_stack.

§

Boolean(bool)

Case(s) boolean.

§

Rotations(EntityMetadataEntryValueRotations)

Case(s) rotations.

§

BlockPos(BlockPos)

Case(s) block_pos.

§

OptionalBlockPos(Option<BlockPos>)

Case(s) optional_block_pos.

§

Direction(i32)

Case(s) direction.

§

OptionalUuid(Option<Uuid>)

Case(s) optional_uuid.

§

BlockState(i32)

Case(s) block_state.

§

OptionalBlockState(i32)

Case(s) optional_block_state.

§

Particle(Particle)

Case(s) particle.

§

Particles(Vec<Particle>)

Case(s) particles.

§

VillagerData(EntityMetadataEntryValueVillagerData)

Case(s) villager_data.

§

OptionalUnsignedInt(i32)

Case(s) optional_unsigned_int.

§

Pose(i32)

Case(s) pose.

§

CatVariant(i32)

Case(s) cat_variant.

§

CatSoundVariant(i32)

Case(s) cat_sound_variant.

§

CowVariant(i32)

Case(s) cow_variant.

§

CowSoundVariant(i32)

Case(s) cow_sound_variant.

§

WolfVariant(i32)

Case(s) wolf_variant.

§

WolfSoundVariant(i32)

Case(s) wolf_sound_variant.

§

FrogVariant(i32)

Case(s) frog_variant.

§

PigVariant(i32)

Case(s) pig_variant.

§

PigSoundVariant(i32)

Case(s) pig_sound_variant.

§

ChickenVariant(i32)

Case(s) chicken_variant.

§

ChickenSoundVariant(i32)

Case(s) chicken_sound_variant.

§

ZombieNautilusVariant(i32)

Case(s) zombie_nautilus_variant.

§

OptionalGlobalPos(Option<GlobalPos>)

Case(s) optional_global_pos.

§

PaintingVariant(Holder<EntityMetadataPaintingVariant>)

Case(s) painting_variant.

§

SnifferState(i32)

Case(s) sniffer_state.

§

ArmadilloState(i32)

Case(s) armadillo_state.

§

CopperGolemState(i32)

Case(s) copper_golem_state.

§

WeatheringCopperGolemState(i32)

Case(s) weathering_copper_golem_state.

§

Vector3(Vec3f)

Case(s) vector3.

§

Quaternion(Vec4f)

Case(s) quaternion.

§

ResolvableProfile(ResolvableProfile)

Case(s) resolvable_profile.

§

HumanoidArm(EntityMetadataEntryValueHumanoidArm)

Case(s) humanoid_arm.

§

Other

Any other value.

Trait Implementations§

Source§

impl Clone for EntityMetadataEntryValue

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for EntityMetadataEntryValue

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for EntityMetadataEntryValue

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for EntityMetadataEntryValue

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.