Enum flatbox_ecs::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) -> ComponentError
fn from(x: MissingComponent) -> ComponentError
Converts to this type from the input type.
source§impl From<NoSuchEntity> for ComponentError
impl From<NoSuchEntity> for ComponentError
source§fn from(_: NoSuchEntity) -> ComponentError
fn from(_: NoSuchEntity) -> ComponentError
Converts to this type from the input type.
source§impl Hash for ComponentError
impl Hash for ComponentError
source§impl PartialEq for ComponentError
impl PartialEq for ComponentError
source§fn eq(&self, other: &ComponentError) -> bool
fn eq(&self, other: &ComponentError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for ComponentError
impl StructuralPartialEq for ComponentError
Auto Trait Implementations§
impl Freeze for ComponentError
impl RefUnwindSafe for ComponentError
impl Send for ComponentError
impl Sync for ComponentError
impl Unpin for ComponentError
impl UnwindSafe for ComponentError
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
source§impl<T> Downcast for T
impl<T> Downcast for T
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.