pub enum EntityDataValue {
Show 31 variants
Byte(u8),
Int(i32),
Long(i64),
Float(f32),
String(String),
FormattedText(FormattedText),
OptionalFormattedText(Option<FormattedText>),
ItemStack(ItemSlot),
Boolean(bool),
Rotations(Rotations),
BlockPos(BlockPos),
OptionalBlockPos(Option<BlockPos>),
Direction(Direction),
OptionalUuid(Option<Uuid>),
BlockState(BlockState),
OptionalBlockState(BlockState),
CompoundTag(NbtCompound),
Particle(Particle),
Particles(Vec<Particle>),
VillagerData(VillagerData),
OptionalUnsignedInt(OptionalUnsignedInt),
Pose(Pose),
CatVariant(CatVariant),
WolfVariant(WolfVariant),
FrogVariant(FrogVariant),
OptionalGlobalPos(Option<GlobalPos>),
PaintingVariant(PaintingVariant),
SnifferState(SnifferState),
ArmadilloState(ArmadilloStateKind),
Vector3(Vec3),
Quaternion(Quaternion),
}
Variants§
Byte(u8)
Int(i32)
Long(i64)
Float(f32)
String(String)
FormattedText(FormattedText)
OptionalFormattedText(Option<FormattedText>)
ItemStack(ItemSlot)
Boolean(bool)
Rotations(Rotations)
BlockPos(BlockPos)
OptionalBlockPos(Option<BlockPos>)
Direction(Direction)
OptionalUuid(Option<Uuid>)
BlockState(BlockState)
OptionalBlockState(BlockState)
If this is air, that means it’s absent,
CompoundTag(NbtCompound)
Particle(Particle)
Particles(Vec<Particle>)
VillagerData(VillagerData)
OptionalUnsignedInt(OptionalUnsignedInt)
Pose(Pose)
CatVariant(CatVariant)
WolfVariant(WolfVariant)
FrogVariant(FrogVariant)
OptionalGlobalPos(Option<GlobalPos>)
PaintingVariant(PaintingVariant)
SnifferState(SnifferState)
ArmadilloState(ArmadilloStateKind)
Vector3(Vec3)
Quaternion(Quaternion)
Implementations§
Source§impl EntityDataValue
impl EntityDataValue
Sourcepub fn as_byte_mut(&mut self) -> Option<&mut u8>
pub fn as_byte_mut(&mut self) -> Option<&mut u8>
Optionally returns mutable references to the inner fields if this is a EntityDataValue::Byte
, otherwise None
Sourcepub fn as_byte(&self) -> Option<&u8>
pub fn as_byte(&self) -> Option<&u8>
Optionally returns references to the inner fields if this is a EntityDataValue::Byte
, otherwise None
Sourcepub fn into_byte(self) -> Result<u8, Self>
pub fn into_byte(self) -> Result<u8, Self>
Returns the inner fields if this is a EntityDataValue::Byte
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn as_int_mut(&mut self) -> Option<&mut i32>
pub fn as_int_mut(&mut self) -> Option<&mut i32>
Optionally returns mutable references to the inner fields if this is a EntityDataValue::Int
, otherwise None
Sourcepub fn as_int(&self) -> Option<&i32>
pub fn as_int(&self) -> Option<&i32>
Optionally returns references to the inner fields if this is a EntityDataValue::Int
, otherwise None
Sourcepub fn into_int(self) -> Result<i32, Self>
pub fn into_int(self) -> Result<i32, Self>
Returns the inner fields if this is a EntityDataValue::Int
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn as_long_mut(&mut self) -> Option<&mut i64>
pub fn as_long_mut(&mut self) -> Option<&mut i64>
Optionally returns mutable references to the inner fields if this is a EntityDataValue::Long
, otherwise None
Sourcepub fn as_long(&self) -> Option<&i64>
pub fn as_long(&self) -> Option<&i64>
Optionally returns references to the inner fields if this is a EntityDataValue::Long
, otherwise None
Sourcepub fn into_long(self) -> Result<i64, Self>
pub fn into_long(self) -> Result<i64, Self>
Returns the inner fields if this is a EntityDataValue::Long
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn is_float(&self) -> bool
pub fn is_float(&self) -> bool
Returns true if this is a EntityDataValue::Float
, otherwise false
Sourcepub fn as_float_mut(&mut self) -> Option<&mut f32>
pub fn as_float_mut(&mut self) -> Option<&mut f32>
Optionally returns mutable references to the inner fields if this is a EntityDataValue::Float
, otherwise None
Sourcepub fn as_float(&self) -> Option<&f32>
pub fn as_float(&self) -> Option<&f32>
Optionally returns references to the inner fields if this is a EntityDataValue::Float
, otherwise None
Sourcepub fn into_float(self) -> Result<f32, Self>
pub fn into_float(self) -> Result<f32, Self>
Returns the inner fields if this is a EntityDataValue::Float
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn is_string(&self) -> bool
pub fn is_string(&self) -> bool
Returns true if this is a EntityDataValue::String
, otherwise false
Sourcepub fn as_string_mut(&mut self) -> Option<&mut String>
pub fn as_string_mut(&mut self) -> Option<&mut String>
Optionally returns mutable references to the inner fields if this is a EntityDataValue::String
, otherwise None
Sourcepub fn as_string(&self) -> Option<&String>
pub fn as_string(&self) -> Option<&String>
Optionally returns references to the inner fields if this is a EntityDataValue::String
, otherwise None
Sourcepub fn into_string(self) -> Result<String, Self>
pub fn into_string(self) -> Result<String, Self>
Returns the inner fields if this is a EntityDataValue::String
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn is_formatted_text(&self) -> bool
pub fn is_formatted_text(&self) -> bool
Returns true if this is a EntityDataValue::FormattedText
, otherwise false
Sourcepub fn as_formatted_text_mut(&mut self) -> Option<&mut FormattedText>
pub fn as_formatted_text_mut(&mut self) -> Option<&mut FormattedText>
Optionally returns mutable references to the inner fields if this is a EntityDataValue::FormattedText
, otherwise None
Sourcepub fn as_formatted_text(&self) -> Option<&FormattedText>
pub fn as_formatted_text(&self) -> Option<&FormattedText>
Optionally returns references to the inner fields if this is a EntityDataValue::FormattedText
, otherwise None
Sourcepub fn into_formatted_text(self) -> Result<FormattedText, Self>
pub fn into_formatted_text(self) -> Result<FormattedText, Self>
Returns the inner fields if this is a EntityDataValue::FormattedText
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn is_optional_formatted_text(&self) -> bool
pub fn is_optional_formatted_text(&self) -> bool
Returns true if this is a EntityDataValue::OptionalFormattedText
, otherwise false
Sourcepub fn as_optional_formatted_text_mut(
&mut self,
) -> Option<&mut Option<FormattedText>>
pub fn as_optional_formatted_text_mut( &mut self, ) -> Option<&mut Option<FormattedText>>
Optionally returns mutable references to the inner fields if this is a EntityDataValue::OptionalFormattedText
, otherwise None
Sourcepub fn as_optional_formatted_text(&self) -> Option<&Option<FormattedText>>
pub fn as_optional_formatted_text(&self) -> Option<&Option<FormattedText>>
Optionally returns references to the inner fields if this is a EntityDataValue::OptionalFormattedText
, otherwise None
Sourcepub fn into_optional_formatted_text(self) -> Result<Option<FormattedText>, Self>
pub fn into_optional_formatted_text(self) -> Result<Option<FormattedText>, Self>
Returns the inner fields if this is a EntityDataValue::OptionalFormattedText
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn is_item_stack(&self) -> bool
pub fn is_item_stack(&self) -> bool
Returns true if this is a EntityDataValue::ItemStack
, otherwise false
Sourcepub fn as_item_stack_mut(&mut self) -> Option<&mut ItemSlot>
pub fn as_item_stack_mut(&mut self) -> Option<&mut ItemSlot>
Optionally returns mutable references to the inner fields if this is a EntityDataValue::ItemStack
, otherwise None
Sourcepub fn as_item_stack(&self) -> Option<&ItemSlot>
pub fn as_item_stack(&self) -> Option<&ItemSlot>
Optionally returns references to the inner fields if this is a EntityDataValue::ItemStack
, otherwise None
Sourcepub fn into_item_stack(self) -> Result<ItemSlot, Self>
pub fn into_item_stack(self) -> Result<ItemSlot, Self>
Returns the inner fields if this is a EntityDataValue::ItemStack
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn is_boolean(&self) -> bool
pub fn is_boolean(&self) -> bool
Returns true if this is a EntityDataValue::Boolean
, otherwise false
Sourcepub fn as_boolean_mut(&mut self) -> Option<&mut bool>
pub fn as_boolean_mut(&mut self) -> Option<&mut bool>
Optionally returns mutable references to the inner fields if this is a EntityDataValue::Boolean
, otherwise None
Sourcepub fn as_boolean(&self) -> Option<&bool>
pub fn as_boolean(&self) -> Option<&bool>
Optionally returns references to the inner fields if this is a EntityDataValue::Boolean
, otherwise None
Sourcepub fn into_boolean(self) -> Result<bool, Self>
pub fn into_boolean(self) -> Result<bool, Self>
Returns the inner fields if this is a EntityDataValue::Boolean
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn is_rotations(&self) -> bool
pub fn is_rotations(&self) -> bool
Returns true if this is a EntityDataValue::Rotations
, otherwise false
Sourcepub fn as_rotations_mut(&mut self) -> Option<&mut Rotations>
pub fn as_rotations_mut(&mut self) -> Option<&mut Rotations>
Optionally returns mutable references to the inner fields if this is a EntityDataValue::Rotations
, otherwise None
Sourcepub fn as_rotations(&self) -> Option<&Rotations>
pub fn as_rotations(&self) -> Option<&Rotations>
Optionally returns references to the inner fields if this is a EntityDataValue::Rotations
, otherwise None
Sourcepub fn into_rotations(self) -> Result<Rotations, Self>
pub fn into_rotations(self) -> Result<Rotations, Self>
Returns the inner fields if this is a EntityDataValue::Rotations
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn is_block_pos(&self) -> bool
pub fn is_block_pos(&self) -> bool
Returns true if this is a EntityDataValue::BlockPos
, otherwise false
Sourcepub fn as_block_pos_mut(&mut self) -> Option<&mut BlockPos>
pub fn as_block_pos_mut(&mut self) -> Option<&mut BlockPos>
Optionally returns mutable references to the inner fields if this is a EntityDataValue::BlockPos
, otherwise None
Sourcepub fn as_block_pos(&self) -> Option<&BlockPos>
pub fn as_block_pos(&self) -> Option<&BlockPos>
Optionally returns references to the inner fields if this is a EntityDataValue::BlockPos
, otherwise None
Sourcepub fn into_block_pos(self) -> Result<BlockPos, Self>
pub fn into_block_pos(self) -> Result<BlockPos, Self>
Returns the inner fields if this is a EntityDataValue::BlockPos
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn is_optional_block_pos(&self) -> bool
pub fn is_optional_block_pos(&self) -> bool
Returns true if this is a EntityDataValue::OptionalBlockPos
, otherwise false
Sourcepub fn as_optional_block_pos_mut(&mut self) -> Option<&mut Option<BlockPos>>
pub fn as_optional_block_pos_mut(&mut self) -> Option<&mut Option<BlockPos>>
Optionally returns mutable references to the inner fields if this is a EntityDataValue::OptionalBlockPos
, otherwise None
Sourcepub fn as_optional_block_pos(&self) -> Option<&Option<BlockPos>>
pub fn as_optional_block_pos(&self) -> Option<&Option<BlockPos>>
Optionally returns references to the inner fields if this is a EntityDataValue::OptionalBlockPos
, otherwise None
Sourcepub fn into_optional_block_pos(self) -> Result<Option<BlockPos>, Self>
pub fn into_optional_block_pos(self) -> Result<Option<BlockPos>, Self>
Returns the inner fields if this is a EntityDataValue::OptionalBlockPos
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn is_direction(&self) -> bool
pub fn is_direction(&self) -> bool
Returns true if this is a EntityDataValue::Direction
, otherwise false
Sourcepub fn as_direction_mut(&mut self) -> Option<&mut Direction>
pub fn as_direction_mut(&mut self) -> Option<&mut Direction>
Optionally returns mutable references to the inner fields if this is a EntityDataValue::Direction
, otherwise None
Sourcepub fn as_direction(&self) -> Option<&Direction>
pub fn as_direction(&self) -> Option<&Direction>
Optionally returns references to the inner fields if this is a EntityDataValue::Direction
, otherwise None
Sourcepub fn into_direction(self) -> Result<Direction, Self>
pub fn into_direction(self) -> Result<Direction, Self>
Returns the inner fields if this is a EntityDataValue::Direction
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn is_optional_uuid(&self) -> bool
pub fn is_optional_uuid(&self) -> bool
Returns true if this is a EntityDataValue::OptionalUuid
, otherwise false
Sourcepub fn as_optional_uuid_mut(&mut self) -> Option<&mut Option<Uuid>>
pub fn as_optional_uuid_mut(&mut self) -> Option<&mut Option<Uuid>>
Optionally returns mutable references to the inner fields if this is a EntityDataValue::OptionalUuid
, otherwise None
Sourcepub fn as_optional_uuid(&self) -> Option<&Option<Uuid>>
pub fn as_optional_uuid(&self) -> Option<&Option<Uuid>>
Optionally returns references to the inner fields if this is a EntityDataValue::OptionalUuid
, otherwise None
Sourcepub fn into_optional_uuid(self) -> Result<Option<Uuid>, Self>
pub fn into_optional_uuid(self) -> Result<Option<Uuid>, Self>
Returns the inner fields if this is a EntityDataValue::OptionalUuid
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn is_block_state(&self) -> bool
pub fn is_block_state(&self) -> bool
Returns true if this is a EntityDataValue::BlockState
, otherwise false
Sourcepub fn as_block_state_mut(&mut self) -> Option<&mut BlockState>
pub fn as_block_state_mut(&mut self) -> Option<&mut BlockState>
Optionally returns mutable references to the inner fields if this is a EntityDataValue::BlockState
, otherwise None
Sourcepub fn as_block_state(&self) -> Option<&BlockState>
pub fn as_block_state(&self) -> Option<&BlockState>
Optionally returns references to the inner fields if this is a EntityDataValue::BlockState
, otherwise None
Sourcepub fn into_block_state(self) -> Result<BlockState, Self>
pub fn into_block_state(self) -> Result<BlockState, Self>
Returns the inner fields if this is a EntityDataValue::BlockState
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn is_optional_block_state(&self) -> bool
pub fn is_optional_block_state(&self) -> bool
Returns true if this is a EntityDataValue::OptionalBlockState
, otherwise false
Sourcepub fn as_optional_block_state_mut(&mut self) -> Option<&mut BlockState>
pub fn as_optional_block_state_mut(&mut self) -> Option<&mut BlockState>
Optionally returns mutable references to the inner fields if this is a EntityDataValue::OptionalBlockState
, otherwise None
Sourcepub fn as_optional_block_state(&self) -> Option<&BlockState>
pub fn as_optional_block_state(&self) -> Option<&BlockState>
Optionally returns references to the inner fields if this is a EntityDataValue::OptionalBlockState
, otherwise None
Sourcepub fn into_optional_block_state(self) -> Result<BlockState, Self>
pub fn into_optional_block_state(self) -> Result<BlockState, Self>
Returns the inner fields if this is a EntityDataValue::OptionalBlockState
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn is_compound_tag(&self) -> bool
pub fn is_compound_tag(&self) -> bool
Returns true if this is a EntityDataValue::CompoundTag
, otherwise false
Sourcepub fn as_compound_tag_mut(&mut self) -> Option<&mut NbtCompound>
pub fn as_compound_tag_mut(&mut self) -> Option<&mut NbtCompound>
Optionally returns mutable references to the inner fields if this is a EntityDataValue::CompoundTag
, otherwise None
Sourcepub fn as_compound_tag(&self) -> Option<&NbtCompound>
pub fn as_compound_tag(&self) -> Option<&NbtCompound>
Optionally returns references to the inner fields if this is a EntityDataValue::CompoundTag
, otherwise None
Sourcepub fn into_compound_tag(self) -> Result<NbtCompound, Self>
pub fn into_compound_tag(self) -> Result<NbtCompound, Self>
Returns the inner fields if this is a EntityDataValue::CompoundTag
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn is_particle(&self) -> bool
pub fn is_particle(&self) -> bool
Returns true if this is a EntityDataValue::Particle
, otherwise false
Sourcepub fn as_particle_mut(&mut self) -> Option<&mut Particle>
pub fn as_particle_mut(&mut self) -> Option<&mut Particle>
Optionally returns mutable references to the inner fields if this is a EntityDataValue::Particle
, otherwise None
Sourcepub fn as_particle(&self) -> Option<&Particle>
pub fn as_particle(&self) -> Option<&Particle>
Optionally returns references to the inner fields if this is a EntityDataValue::Particle
, otherwise None
Sourcepub fn into_particle(self) -> Result<Particle, Self>
pub fn into_particle(self) -> Result<Particle, Self>
Returns the inner fields if this is a EntityDataValue::Particle
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn is_particles(&self) -> bool
pub fn is_particles(&self) -> bool
Returns true if this is a EntityDataValue::Particles
, otherwise false
Sourcepub fn as_particles_mut(&mut self) -> Option<&mut Vec<Particle>>
pub fn as_particles_mut(&mut self) -> Option<&mut Vec<Particle>>
Optionally returns mutable references to the inner fields if this is a EntityDataValue::Particles
, otherwise None
Sourcepub fn as_particles(&self) -> Option<&Vec<Particle>>
pub fn as_particles(&self) -> Option<&Vec<Particle>>
Optionally returns references to the inner fields if this is a EntityDataValue::Particles
, otherwise None
Sourcepub fn into_particles(self) -> Result<Vec<Particle>, Self>
pub fn into_particles(self) -> Result<Vec<Particle>, Self>
Returns the inner fields if this is a EntityDataValue::Particles
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn is_villager_data(&self) -> bool
pub fn is_villager_data(&self) -> bool
Returns true if this is a EntityDataValue::VillagerData
, otherwise false
Sourcepub fn as_villager_data_mut(&mut self) -> Option<&mut VillagerData>
pub fn as_villager_data_mut(&mut self) -> Option<&mut VillagerData>
Optionally returns mutable references to the inner fields if this is a EntityDataValue::VillagerData
, otherwise None
Sourcepub fn as_villager_data(&self) -> Option<&VillagerData>
pub fn as_villager_data(&self) -> Option<&VillagerData>
Optionally returns references to the inner fields if this is a EntityDataValue::VillagerData
, otherwise None
Sourcepub fn into_villager_data(self) -> Result<VillagerData, Self>
pub fn into_villager_data(self) -> Result<VillagerData, Self>
Returns the inner fields if this is a EntityDataValue::VillagerData
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn is_optional_unsigned_int(&self) -> bool
pub fn is_optional_unsigned_int(&self) -> bool
Returns true if this is a EntityDataValue::OptionalUnsignedInt
, otherwise false
Sourcepub fn as_optional_unsigned_int_mut(
&mut self,
) -> Option<&mut OptionalUnsignedInt>
pub fn as_optional_unsigned_int_mut( &mut self, ) -> Option<&mut OptionalUnsignedInt>
Optionally returns mutable references to the inner fields if this is a EntityDataValue::OptionalUnsignedInt
, otherwise None
Sourcepub fn as_optional_unsigned_int(&self) -> Option<&OptionalUnsignedInt>
pub fn as_optional_unsigned_int(&self) -> Option<&OptionalUnsignedInt>
Optionally returns references to the inner fields if this is a EntityDataValue::OptionalUnsignedInt
, otherwise None
Sourcepub fn into_optional_unsigned_int(self) -> Result<OptionalUnsignedInt, Self>
pub fn into_optional_unsigned_int(self) -> Result<OptionalUnsignedInt, Self>
Returns the inner fields if this is a EntityDataValue::OptionalUnsignedInt
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn as_pose_mut(&mut self) -> Option<&mut Pose>
pub fn as_pose_mut(&mut self) -> Option<&mut Pose>
Optionally returns mutable references to the inner fields if this is a EntityDataValue::Pose
, otherwise None
Sourcepub fn as_pose(&self) -> Option<&Pose>
pub fn as_pose(&self) -> Option<&Pose>
Optionally returns references to the inner fields if this is a EntityDataValue::Pose
, otherwise None
Sourcepub fn into_pose(self) -> Result<Pose, Self>
pub fn into_pose(self) -> Result<Pose, Self>
Returns the inner fields if this is a EntityDataValue::Pose
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn is_cat_variant(&self) -> bool
pub fn is_cat_variant(&self) -> bool
Returns true if this is a EntityDataValue::CatVariant
, otherwise false
Sourcepub fn as_cat_variant_mut(&mut self) -> Option<&mut CatVariant>
pub fn as_cat_variant_mut(&mut self) -> Option<&mut CatVariant>
Optionally returns mutable references to the inner fields if this is a EntityDataValue::CatVariant
, otherwise None
Sourcepub fn as_cat_variant(&self) -> Option<&CatVariant>
pub fn as_cat_variant(&self) -> Option<&CatVariant>
Optionally returns references to the inner fields if this is a EntityDataValue::CatVariant
, otherwise None
Sourcepub fn into_cat_variant(self) -> Result<CatVariant, Self>
pub fn into_cat_variant(self) -> Result<CatVariant, Self>
Returns the inner fields if this is a EntityDataValue::CatVariant
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn is_wolf_variant(&self) -> bool
pub fn is_wolf_variant(&self) -> bool
Returns true if this is a EntityDataValue::WolfVariant
, otherwise false
Sourcepub fn as_wolf_variant_mut(&mut self) -> Option<&mut WolfVariant>
pub fn as_wolf_variant_mut(&mut self) -> Option<&mut WolfVariant>
Optionally returns mutable references to the inner fields if this is a EntityDataValue::WolfVariant
, otherwise None
Sourcepub fn as_wolf_variant(&self) -> Option<&WolfVariant>
pub fn as_wolf_variant(&self) -> Option<&WolfVariant>
Optionally returns references to the inner fields if this is a EntityDataValue::WolfVariant
, otherwise None
Sourcepub fn into_wolf_variant(self) -> Result<WolfVariant, Self>
pub fn into_wolf_variant(self) -> Result<WolfVariant, Self>
Returns the inner fields if this is a EntityDataValue::WolfVariant
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn is_frog_variant(&self) -> bool
pub fn is_frog_variant(&self) -> bool
Returns true if this is a EntityDataValue::FrogVariant
, otherwise false
Sourcepub fn as_frog_variant_mut(&mut self) -> Option<&mut FrogVariant>
pub fn as_frog_variant_mut(&mut self) -> Option<&mut FrogVariant>
Optionally returns mutable references to the inner fields if this is a EntityDataValue::FrogVariant
, otherwise None
Sourcepub fn as_frog_variant(&self) -> Option<&FrogVariant>
pub fn as_frog_variant(&self) -> Option<&FrogVariant>
Optionally returns references to the inner fields if this is a EntityDataValue::FrogVariant
, otherwise None
Sourcepub fn into_frog_variant(self) -> Result<FrogVariant, Self>
pub fn into_frog_variant(self) -> Result<FrogVariant, Self>
Returns the inner fields if this is a EntityDataValue::FrogVariant
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn is_optional_global_pos(&self) -> bool
pub fn is_optional_global_pos(&self) -> bool
Returns true if this is a EntityDataValue::OptionalGlobalPos
, otherwise false
Sourcepub fn as_optional_global_pos_mut(&mut self) -> Option<&mut Option<GlobalPos>>
pub fn as_optional_global_pos_mut(&mut self) -> Option<&mut Option<GlobalPos>>
Optionally returns mutable references to the inner fields if this is a EntityDataValue::OptionalGlobalPos
, otherwise None
Sourcepub fn as_optional_global_pos(&self) -> Option<&Option<GlobalPos>>
pub fn as_optional_global_pos(&self) -> Option<&Option<GlobalPos>>
Optionally returns references to the inner fields if this is a EntityDataValue::OptionalGlobalPos
, otherwise None
Sourcepub fn into_optional_global_pos(self) -> Result<Option<GlobalPos>, Self>
pub fn into_optional_global_pos(self) -> Result<Option<GlobalPos>, Self>
Returns the inner fields if this is a EntityDataValue::OptionalGlobalPos
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn is_painting_variant(&self) -> bool
pub fn is_painting_variant(&self) -> bool
Returns true if this is a EntityDataValue::PaintingVariant
, otherwise false
Sourcepub fn as_painting_variant_mut(&mut self) -> Option<&mut PaintingVariant>
pub fn as_painting_variant_mut(&mut self) -> Option<&mut PaintingVariant>
Optionally returns mutable references to the inner fields if this is a EntityDataValue::PaintingVariant
, otherwise None
Sourcepub fn as_painting_variant(&self) -> Option<&PaintingVariant>
pub fn as_painting_variant(&self) -> Option<&PaintingVariant>
Optionally returns references to the inner fields if this is a EntityDataValue::PaintingVariant
, otherwise None
Sourcepub fn into_painting_variant(self) -> Result<PaintingVariant, Self>
pub fn into_painting_variant(self) -> Result<PaintingVariant, Self>
Returns the inner fields if this is a EntityDataValue::PaintingVariant
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn is_sniffer_state(&self) -> bool
pub fn is_sniffer_state(&self) -> bool
Returns true if this is a EntityDataValue::SnifferState
, otherwise false
Sourcepub fn as_sniffer_state_mut(&mut self) -> Option<&mut SnifferState>
pub fn as_sniffer_state_mut(&mut self) -> Option<&mut SnifferState>
Optionally returns mutable references to the inner fields if this is a EntityDataValue::SnifferState
, otherwise None
Sourcepub fn as_sniffer_state(&self) -> Option<&SnifferState>
pub fn as_sniffer_state(&self) -> Option<&SnifferState>
Optionally returns references to the inner fields if this is a EntityDataValue::SnifferState
, otherwise None
Sourcepub fn into_sniffer_state(self) -> Result<SnifferState, Self>
pub fn into_sniffer_state(self) -> Result<SnifferState, Self>
Returns the inner fields if this is a EntityDataValue::SnifferState
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn is_armadillo_state(&self) -> bool
pub fn is_armadillo_state(&self) -> bool
Returns true if this is a EntityDataValue::ArmadilloState
, otherwise false
Sourcepub fn as_armadillo_state_mut(&mut self) -> Option<&mut ArmadilloStateKind>
pub fn as_armadillo_state_mut(&mut self) -> Option<&mut ArmadilloStateKind>
Optionally returns mutable references to the inner fields if this is a EntityDataValue::ArmadilloState
, otherwise None
Sourcepub fn as_armadillo_state(&self) -> Option<&ArmadilloStateKind>
pub fn as_armadillo_state(&self) -> Option<&ArmadilloStateKind>
Optionally returns references to the inner fields if this is a EntityDataValue::ArmadilloState
, otherwise None
Sourcepub fn into_armadillo_state(self) -> Result<ArmadilloStateKind, Self>
pub fn into_armadillo_state(self) -> Result<ArmadilloStateKind, Self>
Returns the inner fields if this is a EntityDataValue::ArmadilloState
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn is_vector3(&self) -> bool
pub fn is_vector3(&self) -> bool
Returns true if this is a EntityDataValue::Vector3
, otherwise false
Sourcepub fn as_vector3_mut(&mut self) -> Option<&mut Vec3>
pub fn as_vector3_mut(&mut self) -> Option<&mut Vec3>
Optionally returns mutable references to the inner fields if this is a EntityDataValue::Vector3
, otherwise None
Sourcepub fn as_vector3(&self) -> Option<&Vec3>
pub fn as_vector3(&self) -> Option<&Vec3>
Optionally returns references to the inner fields if this is a EntityDataValue::Vector3
, otherwise None
Sourcepub fn into_vector3(self) -> Result<Vec3, Self>
pub fn into_vector3(self) -> Result<Vec3, Self>
Returns the inner fields if this is a EntityDataValue::Vector3
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn is_quaternion(&self) -> bool
pub fn is_quaternion(&self) -> bool
Returns true if this is a EntityDataValue::Quaternion
, otherwise false
Sourcepub fn as_quaternion_mut(&mut self) -> Option<&mut Quaternion>
pub fn as_quaternion_mut(&mut self) -> Option<&mut Quaternion>
Optionally returns mutable references to the inner fields if this is a EntityDataValue::Quaternion
, otherwise None
Sourcepub fn as_quaternion(&self) -> Option<&Quaternion>
pub fn as_quaternion(&self) -> Option<&Quaternion>
Optionally returns references to the inner fields if this is a EntityDataValue::Quaternion
, otherwise None
Sourcepub fn into_quaternion(self) -> Result<Quaternion, Self>
pub fn into_quaternion(self) -> Result<Quaternion, Self>
Returns the inner fields if this is a EntityDataValue::Quaternion
, otherwise returns back the enum in the Err
case of the result
Source§impl EntityDataValue
impl EntityDataValue
pub fn read_from_id( buf: &mut Cursor<&[u8]>, id: u32, ) -> Result<Self, BufReadError>
Trait Implementations§
Source§impl Clone for EntityDataValue
impl Clone for EntityDataValue
Source§fn clone(&self) -> EntityDataValue
fn clone(&self) -> EntityDataValue
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for EntityDataValue
impl Debug for EntityDataValue
Source§impl From<EntityDataValue> for UpdateMetadataError
impl From<EntityDataValue> for UpdateMetadataError
Source§fn from(value: EntityDataValue) -> Self
fn from(value: EntityDataValue) -> Self
Source§impl McBufReadable for EntityDataValue
impl McBufReadable for EntityDataValue
Source§impl McBufWritable for EntityDataValue
impl McBufWritable for EntityDataValue
Auto Trait Implementations§
impl Freeze for EntityDataValue
impl !RefUnwindSafe for EntityDataValue
impl Send for EntityDataValue
impl Sync for EntityDataValue
impl Unpin for EntityDataValue
impl !UnwindSafe for EntityDataValue
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§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>
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>
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)
&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)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.