Enum hecs::ComponentError
source · pub enum ComponentError {
NoSuchEntity,
MissingComponent(MissingComponent),
}
Expand description
Errors that arise when accessing components
Variants§
NoSuchEntity
The entity was already despawned
MissingComponent(MissingComponent)
The entity did not have a requested component
Trait Implementations§
source§impl Clone for ComponentError
impl Clone for ComponentError
source§fn clone(&self) -> ComponentError
fn clone(&self) -> ComponentError
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ComponentError
impl Debug for ComponentError
source§impl Display for ComponentError
impl Display for ComponentError
source§impl Error for ComponentError
impl Error for ComponentError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<MissingComponent> for ComponentError
impl From<MissingComponent> for ComponentError
source§fn from(x: MissingComponent) -> Self
fn from(x: MissingComponent) -> Self
Converts to this type from the input type.
source§impl From<NoSuchEntity> for ComponentError
impl From<NoSuchEntity> for ComponentError
source§fn from(NoSuchEntity: NoSuchEntity) -> Self
fn from(NoSuchEntity: NoSuchEntity) -> Self
Converts to this type from the input type.