pub struct Player;Expand description
The entity the player controls: a tag.
Trait Implementations§
impl Component for Player
impl Copy for Player
impl Eq for Player
Source§impl FromValue for Player
impl FromValue for Player
Source§const TYPE_NAME: &'static str = "Player"
const TYPE_NAME: &'static str = "Player"
The type’s name, as
Reflect::type_name gives it.Source§fn from_value(
value: &Value,
cx: &mut ReflectContext<'_>,
) -> Result<Self, ReflectError>
fn from_value( value: &Value, cx: &mut ReflectContext<'_>, ) -> Result<Self, ReflectError>
Makes a value of the type from
value. Read moreSource§impl Reflect for Player
impl Reflect for Player
Source§fn type_name(&self) -> &'static str
fn type_name(&self) -> &'static str
The type’s name: for the macros’ types, its name as written
(
Health), which prefabs and saves use.Source§fn kind(&self) -> ReflectKind
fn kind(&self) -> ReflectKind
What sort of value it is.
Source§fn fields(&self) -> &'static [FieldInfo]
fn fields(&self) -> &'static [FieldInfo]
The fields of a struct, in order; none for other kinds.
Source§fn field(&self, _index: usize) -> Option<&dyn Reflect>
fn field(&self, _index: usize) -> Option<&dyn Reflect>
Field
index of a struct, or element index of a list or an
option.Source§fn field_mut(&mut self, _index: usize) -> Option<&mut dyn Reflect>
fn field_mut(&mut self, _index: usize) -> Option<&mut dyn Reflect>
Field or element
index, to change it.Source§fn apply_value(
&mut self,
value: &Value,
cx: &mut ReflectContext<'_>,
) -> Result<(), ReflectError>
fn apply_value( &mut self, value: &Value, cx: &mut ReflectContext<'_>, ) -> Result<(), ReflectError>
Sets the value from
value. A field that value does not name
keeps its value; a field it names that the type does not have is a
warning. On an error, what was applied before it stays applied. Read moreSource§fn variants(&self) -> &'static [&'static str]
fn variants(&self) -> &'static [&'static str]
The variants of an enum, by name, in order, as data writes them:
what an inspector offers to pick from. None for other kinds, and by
default:
reflect_enum! gives its enum’s.impl StructuralPartialEq for Player
Auto Trait Implementations§
impl Forget for Player
impl Freeze for Player
impl Move for Player
impl RefUnwindSafe for Player
impl Send for Player
impl Sync for Player
impl Unpin for Player
impl UnsafeUnpin for Player
impl UnwindSafe for Player
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
Mutably borrows from an owned value. Read more