pub struct Instance<T>(/* private fields */)
where
T: Kind;Expand description
Represents an Entity of Kind T.
Instance<Any> is functionally equivalent to an entity.
§Usage
An Instance<T> can be used to access entities in a “kind-safe” manner to improve safety and readability.
This type is designed to behave exactly like an Entity.
This means you may use it as a Query parameter, pass it to Commands to access InstanceCommands<T>,
or store it as a type-safe reference to an Entity.
Note that an Instance<T> has 'static lifetime and does not contain any Component data.
It only contains type information.
§Example
#[derive(Component)]
struct Apple;
#[derive(Component)]
struct Orange;
struct Fruit;
impl Kind for Fruit {
type Filter = Or<(With<Apple>, With<Orange>)>;
}
#[derive(Resource, Deref, DerefMut)]
struct FruitBasket(Vec<Instance<Fruit>>);
fn collect_fruits(mut basket: ResMut<FruitBasket>, fruits: Query<Instance<Fruit>>) {
for fruit in fruits.iter() {
println!("{fruit:?}");
basket.push(fruit);
}
}
Implementations§
Source§impl<T> Instance<T>where
T: Kind,
impl<T> Instance<T>where
T: Kind,
Sourcepub const PLACEHOLDER: Instance<T>
pub const PLACEHOLDER: Instance<T>
Same as Entity::PLACEHOLDER, but for an Instance<T>.
Sourcepub unsafe fn from_entity_unchecked(entity: Entity) -> Instance<T>
pub unsafe fn from_entity_unchecked(entity: Entity) -> Instance<T>
Creates a new instance of kind T from some Entity.
§Usage
This function is useful when you know an Entity is of a specific kind and you
need an Instance<T> with no way to validate it.
See Instance::from_entity for a safer alternative.
§Safety
Assumes entity is a valid instance of kind T.
§Example
#[derive(Component)]
struct Apple;
fn init_apple(entity: Entity, commands: &mut Commands) -> Instance<Apple> {
commands.entity(entity).insert(Apple);
// SAFE: `entity` will be a valid instance of `Apple`.
unsafe { Instance::from_entity_unchecked(entity) }
}Sourcepub fn cast_into<U>(self) -> Instance<U>
pub fn cast_into<U>(self) -> Instance<U>
Converts this instance into an instance of another kind Kind U.
§Usage
A kind T is safety convertible to another kind U if T implements CastInto<U>.
Sourcepub fn cast_into_any(self) -> Instance<Any>
pub fn cast_into_any(self) -> Instance<Any>
Converts this instance into an instance of Kind Any.
§Usage
Any Instance<T> can be safely cast into an Instance<Any> using this function.
Sourcepub unsafe fn cast_into_unchecked<U>(self) -> Instance<U>where
U: Kind,
pub unsafe fn cast_into_unchecked<U>(self) -> Instance<U>where
U: Kind,
Converts this instance into an instance of another kind Kind U without any validation.
§Usage
This function is useful when you know an Instance<T> is convertible to a specific type and you
need an Instance<U> with no way to validate it.
Always prefer to explicitly declare safe casts with the CastInto trait and use Instance::cast_into.
§Safety
Assumes this instance is also a valid Instance<U>.
Trait Implementations§
Source§impl<T> ContainsEntity for Instance<T>where
T: Kind,
impl<T> ContainsEntity for Instance<T>where
T: Kind,
Source§impl<'a, T> From<&InstanceCommands<'a, T>> for Instance<T>where
T: Kind,
impl<'a, T> From<&InstanceCommands<'a, T>> for Instance<T>where
T: Kind,
Source§fn from(commands: &InstanceCommands<'a, T>) -> Instance<T>
fn from(commands: &InstanceCommands<'a, T>) -> Instance<T>
Source§impl<T> From<&InstanceMut<'_, T>> for Instance<T>where
T: Component,
impl<T> From<&InstanceMut<'_, T>> for Instance<T>where
T: Component,
Source§fn from(item: &InstanceMut<'_, T>) -> Instance<T>
fn from(item: &InstanceMut<'_, T>) -> Instance<T>
Source§impl<T> From<&InstanceRef<'_, T>> for Instance<T>where
T: Component,
impl<T> From<&InstanceRef<'_, T>> for Instance<T>where
T: Component,
Source§fn from(item: &InstanceRef<'_, T>) -> Instance<T>
fn from(item: &InstanceRef<'_, T>) -> Instance<T>
Source§impl<'a, T> From<InstanceCommands<'a, T>> for Instance<T>where
T: Kind,
impl<'a, T> From<InstanceCommands<'a, T>> for Instance<T>where
T: Kind,
Source§fn from(commands: InstanceCommands<'a, T>) -> Instance<T>
fn from(commands: InstanceCommands<'a, T>) -> Instance<T>
Source§impl<T> From<InstanceMut<'_, T>> for Instance<T>where
T: Component,
impl<T> From<InstanceMut<'_, T>> for Instance<T>where
T: Component,
Source§fn from(item: InstanceMut<'_, T>) -> Instance<T>
fn from(item: InstanceMut<'_, T>) -> Instance<T>
Source§impl<T> From<InstanceRef<'_, T>> for Instance<T>where
T: Component,
impl<T> From<InstanceRef<'_, T>> for Instance<T>where
T: Component,
Source§fn from(item: InstanceRef<'_, T>) -> Instance<T>
fn from(item: InstanceRef<'_, T>) -> Instance<T>
Source§impl<T> From<ObjectWorldRef<'_, T>> for Instance<T>where
T: Kind,
impl<T> From<ObjectWorldRef<'_, T>> for Instance<T>where
T: Kind,
Source§fn from(object: ObjectWorldRef<'_, T>) -> Instance<T>
fn from(object: ObjectWorldRef<'_, T>) -> Instance<T>
Source§impl<T> FromReflect for Instance<T>
impl<T> FromReflect for Instance<T>
Source§fn from_reflect(reflect: &(dyn PartialReflect + 'static)) -> Option<Instance<T>>
fn from_reflect(reflect: &(dyn PartialReflect + 'static)) -> Option<Instance<T>>
Self from a reflected value.Source§fn take_from_reflect(
reflect: Box<dyn PartialReflect>,
) -> Result<Self, Box<dyn PartialReflect>>
fn take_from_reflect( reflect: Box<dyn PartialReflect>, ) -> Result<Self, Box<dyn PartialReflect>>
Self using,
constructing the value using from_reflect if that fails. Read moreSource§impl<T> GetTypeRegistration for Instance<T>
impl<T> GetTypeRegistration for Instance<T>
Source§fn get_type_registration() -> TypeRegistration
fn get_type_registration() -> TypeRegistration
TypeRegistration for this type.Source§fn register_type_dependencies(registry: &mut TypeRegistry)
fn register_type_dependencies(registry: &mut TypeRegistry)
Source§impl<T> MapEntities for Instance<T>where
T: Kind,
impl<T> MapEntities for Instance<T>where
T: Kind,
Source§fn map_entities<M>(&mut self, entity_mapper: &mut M)where
M: EntityMapper,
fn map_entities<M>(&mut self, entity_mapper: &mut M)where
M: EntityMapper,
Source§impl<T> Ord for Instance<T>where
T: Kind,
impl<T> Ord for Instance<T>where
T: Kind,
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl<T> PartialOrd for Instance<T>where
T: Kind,
impl<T> PartialOrd for Instance<T>where
T: Kind,
Source§impl<T> PartialReflect for Instance<T>
impl<T> PartialReflect for Instance<T>
Source§fn get_represented_type_info(&self) -> Option<&'static TypeInfo>
fn get_represented_type_info(&self) -> Option<&'static TypeInfo>
Source§fn try_apply(
&mut self,
value: &(dyn PartialReflect + 'static),
) -> Result<(), ApplyError>
fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>
Source§fn reflect_kind(&self) -> ReflectKind
fn reflect_kind(&self) -> ReflectKind
Source§fn reflect_ref(&self) -> ReflectRef<'_>
fn reflect_ref(&self) -> ReflectRef<'_>
Source§fn reflect_mut(&mut self) -> ReflectMut<'_>
fn reflect_mut(&mut self) -> ReflectMut<'_>
Source§fn reflect_owned(self: Box<Instance<T>>) -> ReflectOwned
fn reflect_owned(self: Box<Instance<T>>) -> ReflectOwned
Source§fn try_into_reflect(
self: Box<Instance<T>>,
) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>
fn try_into_reflect( self: Box<Instance<T>>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>
Source§fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>
fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>
Source§fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>
fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>
Source§fn into_partial_reflect(self: Box<Instance<T>>) -> Box<dyn PartialReflect>
fn into_partial_reflect(self: Box<Instance<T>>) -> Box<dyn PartialReflect>
Source§fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)
fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)
Source§fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)
fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)
Source§fn reflect_partial_eq(
&self,
value: &(dyn PartialReflect + 'static),
) -> Option<bool>
fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>
Source§fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>
fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>
Self using reflection. Read moreSource§fn apply(&mut self, value: &(dyn PartialReflect + 'static))
fn apply(&mut self, value: &(dyn PartialReflect + 'static))
Source§fn to_dynamic(&self) -> Box<dyn PartialReflect>
fn to_dynamic(&self) -> Box<dyn PartialReflect>
Source§fn reflect_clone_and_take<T>(&self) -> Result<T, ReflectCloneError>
fn reflect_clone_and_take<T>(&self) -> Result<T, ReflectCloneError>
PartialReflect, combines reflect_clone and
take in a useful fashion, automatically constructing an appropriate
ReflectCloneError if the downcast fails. Read moreSource§fn reflect_hash(&self) -> Option<u64>
fn reflect_hash(&self) -> Option<u64>
Source§fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>
fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>
Source§fn is_dynamic(&self) -> bool
fn is_dynamic(&self) -> bool
Source§impl<T> QueryData for Instance<T>where
T: Kind,
impl<T> QueryData for Instance<T>where
T: Kind,
Source§const IS_READ_ONLY: bool = <Entity as QueryData>::IS_READ_ONLY
const IS_READ_ONLY: bool = <Entity as QueryData>::IS_READ_ONLY
Source§const IS_ARCHETYPAL: bool = <Entity as QueryData>::IS_ARCHETYPAL
const IS_ARCHETYPAL: bool = <Entity as QueryData>::IS_ARCHETYPAL
Source§type ReadOnly = Instance<T>
type ReadOnly = Instance<T>
QueryData, which satisfies the ReadOnlyQueryData trait.Source§type Item<'w, 's> = Instance<T>
type Item<'w, 's> = Instance<T>
WorldQuery
This will be the data retrieved by the query,
and is visible to the end user when calling e.g. Query<Self>::get.Source§fn shrink<'wlong, 'wshort, 's>(
item: <Instance<T> as QueryData>::Item<'wlong, 's>,
) -> <Instance<T> as QueryData>::Item<'wshort, 's>where
'wlong: 'wshort,
fn shrink<'wlong, 'wshort, 's>(
item: <Instance<T> as QueryData>::Item<'wlong, 's>,
) -> <Instance<T> as QueryData>::Item<'wshort, 's>where
'wlong: 'wshort,
Source§unsafe fn fetch<'w, 's>(
_state: &'s <Instance<T> as WorldQuery>::State,
_fetch: &mut <Instance<T> as WorldQuery>::Fetch<'w>,
entity: Entity,
_table_row: TableRow,
) -> Option<<Instance<T> as QueryData>::Item<'w, 's>>
unsafe fn fetch<'w, 's>( _state: &'s <Instance<T> as WorldQuery>::State, _fetch: &mut <Instance<T> as WorldQuery>::Fetch<'w>, entity: Entity, _table_row: TableRow, ) -> Option<<Instance<T> as QueryData>::Item<'w, 's>>
Self::Item for either the given entity in the current Table,
or for the given entity in the current Archetype. This must always be called after
WorldQuery::set_table with a table_row in the range of the current Table or after
WorldQuery::set_archetype with an entity in the current archetype.
Accesses components registered in WorldQuery::update_component_access. Read moreSource§fn iter_access(
_state: &<Instance<T> as WorldQuery>::State,
) -> impl Iterator<Item = EcsAccessType<'_>>
fn iter_access( _state: &<Instance<T> as WorldQuery>::State, ) -> impl Iterator<Item = EcsAccessType<'_>>
QueryData::fetch. Access conflicts are usually
checked in WorldQuery::update_component_access, but in certain cases this method can be useful to implement
a way of checking for access conflicts in a non-allocating way.Source§fn provide_extra_access(
_state: &mut Self::State,
_access: &mut Access,
_available_access: &Access,
)
fn provide_extra_access( _state: &mut Self::State, _access: &mut Access, _available_access: &Access, )
update_component_access.
Implementations may add additional access that is a subset of available_access
and does not conflict with anything in access,
and must update access to include that access. Read moreSource§impl<T> Reflect for Instance<T>
impl<T> Reflect for Instance<T>
Source§fn into_any(self: Box<Instance<T>>) -> Box<dyn Any>
fn into_any(self: Box<Instance<T>>) -> Box<dyn Any>
Box<dyn Any>. Read moreSource§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut dyn Any. Read moreSource§fn into_reflect(self: Box<Instance<T>>) -> Box<dyn Reflect>
fn into_reflect(self: Box<Instance<T>>) -> Box<dyn Reflect>
Source§fn as_reflect(&self) -> &(dyn Reflect + 'static)
fn as_reflect(&self) -> &(dyn Reflect + 'static)
Source§fn as_reflect_mut(&mut self) -> &mut (dyn Reflect + 'static)
fn as_reflect_mut(&mut self) -> &mut (dyn Reflect + 'static)
Source§impl<T> RelationshipSourceCollection for Instance<T>where
T: Kind,
impl<T> RelationshipSourceCollection for Instance<T>where
T: Kind,
Source§type SourceIter<'a> = <Entity as RelationshipSourceCollection>::SourceIter<'a>
type SourceIter<'a> = <Entity as RelationshipSourceCollection>::SourceIter<'a>
iter method. Read moreSource§fn with_capacity(_capacity: usize) -> Instance<T>
fn with_capacity(_capacity: usize) -> Instance<T>
capacity. Read moreSource§fn reserve(&mut self, additional: usize)
fn reserve(&mut self, additional: usize)
additional more entities to be inserted. Read moreSource§fn remove(&mut self, entity: Entity) -> bool
fn remove(&mut self, entity: Entity) -> bool
entity from the collection. Read moreSource§fn iter(&self) -> <Instance<T> as RelationshipSourceCollection>::SourceIter<'_>
fn iter(&self) -> <Instance<T> as RelationshipSourceCollection>::SourceIter<'_>
Source§fn shrink_to_fit(&mut self)
fn shrink_to_fit(&mut self)
Source§fn extend_from_iter(&mut self, entities: impl IntoIterator<Item = Entity>)
fn extend_from_iter(&mut self, entities: impl IntoIterator<Item = Entity>)
Source§fn source_to_remove_before_add(&self) -> Option<Entity>
fn source_to_remove_before_add(&self) -> Option<Entity>
None for one-to-many relationships or when no entity needs to be removed.Source§impl<T> TupleStruct for Instance<T>
impl<T> TupleStruct for Instance<T>
Source§fn field(&self, index: usize) -> Option<&(dyn PartialReflect + 'static)>
fn field(&self, index: usize) -> Option<&(dyn PartialReflect + 'static)>
index as a
&dyn Reflect.Source§fn field_mut(
&mut self,
index: usize,
) -> Option<&mut (dyn PartialReflect + 'static)>
fn field_mut( &mut self, index: usize, ) -> Option<&mut (dyn PartialReflect + 'static)>
index
as a &mut dyn Reflect.Source§fn iter_fields(&self) -> TupleStructFieldIter<'_> ⓘ
fn iter_fields(&self) -> TupleStructFieldIter<'_> ⓘ
Source§fn to_dynamic_tuple_struct(&self) -> DynamicTupleStruct
fn to_dynamic_tuple_struct(&self) -> DynamicTupleStruct
DynamicTupleStruct from this tuple struct.Source§fn get_represented_tuple_struct_info(&self) -> Option<&'static TupleStructInfo>
fn get_represented_tuple_struct_info(&self) -> Option<&'static TupleStructInfo>
None if TypeInfo is not available.Source§impl<T> TypePath for Instance<T>
impl<T> TypePath for Instance<T>
Source§fn type_path() -> &'static str
fn type_path() -> &'static str
Source§fn short_type_path() -> &'static str
fn short_type_path() -> &'static str
Source§fn type_ident() -> Option<&'static str>
fn type_ident() -> Option<&'static str>
Source§fn crate_name() -> Option<&'static str>
fn crate_name() -> Option<&'static str>
Source§impl<T> WorldQuery for Instance<T>where
T: Kind,
impl<T> WorldQuery for Instance<T>where
T: Kind,
Source§const IS_DENSE: bool = <T::Filter as WorldQuery>::IS_DENSE
const IS_DENSE: bool = <T::Filter as WorldQuery>::IS_DENSE
Source§type Fetch<'a> = <<T as Kind>::Filter as WorldQuery>::Fetch<'a>
type Fetch<'a> = <<T as Kind>::Filter as WorldQuery>::Fetch<'a>
WorldQuery to compute Self::Item for each entity.Source§type State = <<T as Kind>::Filter as WorldQuery>::State
type State = <<T as Kind>::Filter as WorldQuery>::State
Self::Fetch. This will be cached inside QueryState,
so it is best to move as much data / computation here as possible to reduce the cost of
constructing Self::Fetch.Source§fn shrink_fetch<'wlong, 'wshort>(
fetch: <Instance<T> as WorldQuery>::Fetch<'wlong>,
) -> <Instance<T> as WorldQuery>::Fetch<'wshort>where
'wlong: 'wshort,
fn shrink_fetch<'wlong, 'wshort>(
fetch: <Instance<T> as WorldQuery>::Fetch<'wlong>,
) -> <Instance<T> as WorldQuery>::Fetch<'wshort>where
'wlong: 'wshort,
Source§unsafe fn init_fetch<'w>(
world: UnsafeWorldCell<'w>,
state: &<Instance<T> as WorldQuery>::State,
last_change_tick: Tick,
change_tick: Tick,
) -> <Instance<T> as WorldQuery>::Fetch<'w>
unsafe fn init_fetch<'w>( world: UnsafeWorldCell<'w>, state: &<Instance<T> as WorldQuery>::State, last_change_tick: Tick, change_tick: Tick, ) -> <Instance<T> as WorldQuery>::Fetch<'w>
Self::Fetch,
by combining data from the World with the cached Self::State.
Readonly accesses resources registered in WorldQuery::update_component_access. Read moreSource§unsafe fn set_archetype<'w>(
fetch: &mut <Instance<T> as WorldQuery>::Fetch<'w>,
state: &<Instance<T> as WorldQuery>::State,
archetype: &'w Archetype,
table: &'w Table,
)
unsafe fn set_archetype<'w>( fetch: &mut <Instance<T> as WorldQuery>::Fetch<'w>, state: &<Instance<T> as WorldQuery>::State, archetype: &'w Archetype, table: &'w Table, )
Archetype. This will always be called on
archetypes that match this WorldQuery. Read moreSource§unsafe fn set_table<'w>(
fetch: &mut <Instance<T> as WorldQuery>::Fetch<'w>,
state: &<Instance<T> as WorldQuery>::State,
table: &'w Table,
)
unsafe fn set_table<'w>( fetch: &mut <Instance<T> as WorldQuery>::Fetch<'w>, state: &<Instance<T> as WorldQuery>::State, table: &'w Table, )
Table. This will always be called on tables
that match this WorldQuery. Read moreSource§fn update_component_access(
state: &<Instance<T> as WorldQuery>::State,
access: &mut FilteredAccess,
)
fn update_component_access( state: &<Instance<T> as WorldQuery>::State, access: &mut FilteredAccess, )
Source§fn get_state(
components: &Components,
) -> Option<<Instance<T> as WorldQuery>::State>
fn get_state( components: &Components, ) -> Option<<Instance<T> as WorldQuery>::State>
Source§fn init_state(world: &mut World) -> <Instance<T> as WorldQuery>::State
fn init_state(world: &mut World) -> <Instance<T> as WorldQuery>::State
State for this WorldQuery type.Source§fn matches_component_set(
state: &<Instance<T> as WorldQuery>::State,
set_contains_id: &impl Fn(ComponentId) -> bool,
) -> bool
fn matches_component_set( state: &<Instance<T> as WorldQuery>::State, set_contains_id: &impl Fn(ComponentId) -> bool, ) -> bool
impl<T> Copy for Instance<T>where
T: Kind,
impl<T> Eq for Instance<T>where
T: Kind,
impl<T> ReadOnlyQueryData for Instance<T>where
T: Kind,
Auto Trait Implementations§
impl<T> Freeze for Instance<T>
impl<T> RefUnwindSafe for Instance<T>where
T: RefUnwindSafe,
impl<T> Send for Instance<T>
impl<T> Sync for Instance<T>
impl<T> Unpin for Instance<T>where
T: Unpin,
impl<T> UnwindSafe for Instance<T>where
T: UnwindSafe,
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§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§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>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§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>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§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.Source§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.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DynamicTypePath for Twhere
T: TypePath,
impl<T> DynamicTypePath for Twhere
T: TypePath,
Source§fn reflect_type_path(&self) -> &str
fn reflect_type_path(&self) -> &str
TypePath::type_path.Source§fn reflect_short_type_path(&self) -> &str
fn reflect_short_type_path(&self) -> &str
Source§fn reflect_type_ident(&self) -> Option<&str>
fn reflect_type_ident(&self) -> Option<&str>
TypePath::type_ident.Source§fn reflect_crate_name(&self) -> Option<&str>
fn reflect_crate_name(&self) -> Option<&str>
TypePath::crate_name.Source§fn reflect_module_path(&self) -> Option<&str>
fn reflect_module_path(&self) -> Option<&str>
Source§impl<T> DynamicTyped for Twhere
T: Typed,
impl<T> DynamicTyped for Twhere
T: Typed,
Source§fn reflect_type_info(&self) -> &'static TypeInfo
fn reflect_type_info(&self) -> &'static TypeInfo
Typed::type_info.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> GetPath for T
impl<T> GetPath for T
Source§fn reflect_path<'p>(
&self,
path: impl ReflectPath<'p>,
) -> Result<&(dyn PartialReflect + 'static), ReflectPathError<'p>>
fn reflect_path<'p>( &self, path: impl ReflectPath<'p>, ) -> Result<&(dyn PartialReflect + 'static), ReflectPathError<'p>>
path. Read moreSource§fn reflect_path_mut<'p>(
&mut self,
path: impl ReflectPath<'p>,
) -> Result<&mut (dyn PartialReflect + 'static), ReflectPathError<'p>>
fn reflect_path_mut<'p>( &mut self, path: impl ReflectPath<'p>, ) -> Result<&mut (dyn PartialReflect + 'static), ReflectPathError<'p>>
path. Read moreSource§fn path<'p, T>(
&self,
path: impl ReflectPath<'p>,
) -> Result<&T, ReflectPathError<'p>>where
T: Reflect,
fn path<'p, T>(
&self,
path: impl ReflectPath<'p>,
) -> Result<&T, ReflectPathError<'p>>where
T: Reflect,
path. Read moreSource§fn path_mut<'p, T>(
&mut self,
path: impl ReflectPath<'p>,
) -> Result<&mut T, ReflectPathError<'p>>where
T: Reflect,
fn path_mut<'p, T>(
&mut self,
path: impl ReflectPath<'p>,
) -> Result<&mut T, ReflectPathError<'p>>where
T: Reflect,
path. Read moreSource§impl<S> GetTupleStructField for Swhere
S: TupleStruct,
impl<S> GetTupleStructField for Swhere
S: TupleStruct,
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> 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 more