azalea_entity

Enum EntityDataValue

Source
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

Source

pub fn is_byte(&self) -> bool

Returns true if this is a EntityDataValue::Byte, otherwise false

Source

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

Source

pub fn as_byte(&self) -> Option<&u8>

Optionally returns references to the inner fields if this is a EntityDataValue::Byte, otherwise None

Source

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

Source

pub fn is_int(&self) -> bool

Returns true if this is a EntityDataValue::Int, otherwise false

Source

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

Source

pub fn as_int(&self) -> Option<&i32>

Optionally returns references to the inner fields if this is a EntityDataValue::Int, otherwise None

Source

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

Source

pub fn is_long(&self) -> bool

Returns true if this is a EntityDataValue::Long, otherwise false

Source

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

Source

pub fn as_long(&self) -> Option<&i64>

Optionally returns references to the inner fields if this is a EntityDataValue::Long, otherwise None

Source

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

Source

pub fn is_float(&self) -> bool

Returns true if this is a EntityDataValue::Float, otherwise false

Source

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

Source

pub fn as_float(&self) -> Option<&f32>

Optionally returns references to the inner fields if this is a EntityDataValue::Float, otherwise None

Source

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

Source

pub fn is_string(&self) -> bool

Returns true if this is a EntityDataValue::String, otherwise false

Source

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

Source

pub fn as_string(&self) -> Option<&String>

Optionally returns references to the inner fields if this is a EntityDataValue::String, otherwise None

Source

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

Source

pub fn is_formatted_text(&self) -> bool

Returns true if this is a EntityDataValue::FormattedText, otherwise false

Source

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

Source

pub fn as_formatted_text(&self) -> Option<&FormattedText>

Optionally returns references to the inner fields if this is a EntityDataValue::FormattedText, otherwise None

Source

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

Source

pub fn is_optional_formatted_text(&self) -> bool

Returns true if this is a EntityDataValue::OptionalFormattedText, otherwise false

Source

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

Source

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

Source

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

Source

pub fn is_item_stack(&self) -> bool

Returns true if this is a EntityDataValue::ItemStack, otherwise false

Source

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

Source

pub fn as_item_stack(&self) -> Option<&ItemSlot>

Optionally returns references to the inner fields if this is a EntityDataValue::ItemStack, otherwise None

Source

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

Source

pub fn is_boolean(&self) -> bool

Returns true if this is a EntityDataValue::Boolean, otherwise false

Source

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

Source

pub fn as_boolean(&self) -> Option<&bool>

Optionally returns references to the inner fields if this is a EntityDataValue::Boolean, otherwise None

Source

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

Source

pub fn is_rotations(&self) -> bool

Returns true if this is a EntityDataValue::Rotations, otherwise false

Source

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

Source

pub fn as_rotations(&self) -> Option<&Rotations>

Optionally returns references to the inner fields if this is a EntityDataValue::Rotations, otherwise None

Source

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

Source

pub fn is_block_pos(&self) -> bool

Returns true if this is a EntityDataValue::BlockPos, otherwise false

Source

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

Source

pub fn as_block_pos(&self) -> Option<&BlockPos>

Optionally returns references to the inner fields if this is a EntityDataValue::BlockPos, otherwise None

Source

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

Source

pub fn is_optional_block_pos(&self) -> bool

Returns true if this is a EntityDataValue::OptionalBlockPos, otherwise false

Source

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

Source

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

Source

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

Source

pub fn is_direction(&self) -> bool

Returns true if this is a EntityDataValue::Direction, otherwise false

Source

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

Source

pub fn as_direction(&self) -> Option<&Direction>

Optionally returns references to the inner fields if this is a EntityDataValue::Direction, otherwise None

Source

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

Source

pub fn is_optional_uuid(&self) -> bool

Returns true if this is a EntityDataValue::OptionalUuid, otherwise false

Source

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

Source

pub fn as_optional_uuid(&self) -> Option<&Option<Uuid>>

Optionally returns references to the inner fields if this is a EntityDataValue::OptionalUuid, otherwise None

Source

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

Source

pub fn is_block_state(&self) -> bool

Returns true if this is a EntityDataValue::BlockState, otherwise false

Source

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

Source

pub fn as_block_state(&self) -> Option<&BlockState>

Optionally returns references to the inner fields if this is a EntityDataValue::BlockState, otherwise None

Source

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

Source

pub fn is_optional_block_state(&self) -> bool

Returns true if this is a EntityDataValue::OptionalBlockState, otherwise false

Source

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

Source

pub fn as_optional_block_state(&self) -> Option<&BlockState>

Optionally returns references to the inner fields if this is a EntityDataValue::OptionalBlockState, otherwise None

Source

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

Source

pub fn is_compound_tag(&self) -> bool

Returns true if this is a EntityDataValue::CompoundTag, otherwise false

Source

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

Source

pub fn as_compound_tag(&self) -> Option<&NbtCompound>

Optionally returns references to the inner fields if this is a EntityDataValue::CompoundTag, otherwise None

Source

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

Source

pub fn is_particle(&self) -> bool

Returns true if this is a EntityDataValue::Particle, otherwise false

Source

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

Source

pub fn as_particle(&self) -> Option<&Particle>

Optionally returns references to the inner fields if this is a EntityDataValue::Particle, otherwise None

Source

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

Source

pub fn is_particles(&self) -> bool

Returns true if this is a EntityDataValue::Particles, otherwise false

Source

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

Source

pub fn as_particles(&self) -> Option<&Vec<Particle>>

Optionally returns references to the inner fields if this is a EntityDataValue::Particles, otherwise None

Source

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

Source

pub fn is_villager_data(&self) -> bool

Returns true if this is a EntityDataValue::VillagerData, otherwise false

Source

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

Source

pub fn as_villager_data(&self) -> Option<&VillagerData>

Optionally returns references to the inner fields if this is a EntityDataValue::VillagerData, otherwise None

Source

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

Source

pub fn is_optional_unsigned_int(&self) -> bool

Returns true if this is a EntityDataValue::OptionalUnsignedInt, otherwise false

Source

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

Source

pub fn as_optional_unsigned_int(&self) -> Option<&OptionalUnsignedInt>

Optionally returns references to the inner fields if this is a EntityDataValue::OptionalUnsignedInt, otherwise None

Source

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

Source

pub fn is_pose(&self) -> bool

Returns true if this is a EntityDataValue::Pose, otherwise false

Source

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

Source

pub fn as_pose(&self) -> Option<&Pose>

Optionally returns references to the inner fields if this is a EntityDataValue::Pose, otherwise None

Source

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

Source

pub fn is_cat_variant(&self) -> bool

Returns true if this is a EntityDataValue::CatVariant, otherwise false

Source

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

Source

pub fn as_cat_variant(&self) -> Option<&CatVariant>

Optionally returns references to the inner fields if this is a EntityDataValue::CatVariant, otherwise None

Source

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

Source

pub fn is_wolf_variant(&self) -> bool

Returns true if this is a EntityDataValue::WolfVariant, otherwise false

Source

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

Source

pub fn as_wolf_variant(&self) -> Option<&WolfVariant>

Optionally returns references to the inner fields if this is a EntityDataValue::WolfVariant, otherwise None

Source

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

Source

pub fn is_frog_variant(&self) -> bool

Returns true if this is a EntityDataValue::FrogVariant, otherwise false

Source

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

Source

pub fn as_frog_variant(&self) -> Option<&FrogVariant>

Optionally returns references to the inner fields if this is a EntityDataValue::FrogVariant, otherwise None

Source

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

Source

pub fn is_optional_global_pos(&self) -> bool

Returns true if this is a EntityDataValue::OptionalGlobalPos, otherwise false

Source

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

Source

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

Source

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

Source

pub fn is_painting_variant(&self) -> bool

Returns true if this is a EntityDataValue::PaintingVariant, otherwise false

Source

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

Source

pub fn as_painting_variant(&self) -> Option<&PaintingVariant>

Optionally returns references to the inner fields if this is a EntityDataValue::PaintingVariant, otherwise None

Source

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

Source

pub fn is_sniffer_state(&self) -> bool

Returns true if this is a EntityDataValue::SnifferState, otherwise false

Source

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

Source

pub fn as_sniffer_state(&self) -> Option<&SnifferState>

Optionally returns references to the inner fields if this is a EntityDataValue::SnifferState, otherwise None

Source

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

Source

pub fn is_armadillo_state(&self) -> bool

Returns true if this is a EntityDataValue::ArmadilloState, otherwise false

Source

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

Source

pub fn as_armadillo_state(&self) -> Option<&ArmadilloStateKind>

Optionally returns references to the inner fields if this is a EntityDataValue::ArmadilloState, otherwise None

Source

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

Source

pub fn is_vector3(&self) -> bool

Returns true if this is a EntityDataValue::Vector3, otherwise false

Source

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

Source

pub fn as_vector3(&self) -> Option<&Vec3>

Optionally returns references to the inner fields if this is a EntityDataValue::Vector3, otherwise None

Source

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

Source

pub fn is_quaternion(&self) -> bool

Returns true if this is a EntityDataValue::Quaternion, otherwise false

Source

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

Source

pub fn as_quaternion(&self) -> Option<&Quaternion>

Optionally returns references to the inner fields if this is a EntityDataValue::Quaternion, otherwise None

Source

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

Source

pub fn write_without_id(&self, buf: &mut impl Write) -> Result<(), Error>

Source§

impl EntityDataValue

Source

pub fn read_from_id( buf: &mut Cursor<&[u8]>, id: u32, ) -> Result<Self, BufReadError>

Trait Implementations§

Source§

impl Clone for EntityDataValue

Source§

fn clone(&self) -> EntityDataValue

Returns a copy of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for EntityDataValue

Source§

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

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

impl From<EntityDataValue> for UpdateMetadataError

Source§

fn from(value: EntityDataValue) -> Self

Converts to this type from the input type.
Source§

impl McBufReadable for EntityDataValue

Source§

fn read_from(buf: &mut Cursor<&[u8]>) -> Result<Self, BufReadError>

Source§

impl McBufWritable for EntityDataValue

Source§

fn write_into(&self, buf: &mut impl Write) -> Result<(), Error>

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, dst: *mut T)

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

impl<T> Downcast for T
where T: 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>

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)

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)

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
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
§

impl<T> TypeData for T
where T: 'static + Send + Sync + Clone,

§

fn clone_type_data(&self) -> Box<dyn TypeData>

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more