pub enum PhysicsError {
InvalidBodyIndex {
index: usize,
count: usize,
},
DeserializationFailed,
InvalidConstraint {
reason: &'static str,
},
ZeroLengthVector {
context: &'static str,
},
IoError {
message: &'static str,
},
CapacityExceeded {
resource: &'static str,
limit: usize,
},
InvalidConfiguration {
reason: &'static str,
},
}Expand description
Unified error type for physics operations.
Variants§
InvalidBodyIndex
Body index is out of range.
Fields
DeserializationFailed
State deserialization failed (corrupted or incompatible data).
InvalidConstraint
A constraint references a body that does not exist.
ZeroLengthVector
A zero-length direction or normal was provided where a unit vector is required.
IoError
I/O error (reading/writing scene files).
CapacityExceeded
A capacity limit was exceeded (too many bodies, constraints, etc.).
InvalidConfiguration
Invalid configuration parameter.
Trait Implementations§
Source§impl Clone for PhysicsError
impl Clone for PhysicsError
Source§impl Debug for PhysicsError
impl Debug for PhysicsError
Source§impl Display for PhysicsError
impl Display for PhysicsError
impl Eq for PhysicsError
Source§impl Error for PhysicsError
Available on crate feature std only.
impl Error for PhysicsError
Available on crate feature
std only.1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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 PartialEq for PhysicsError
impl PartialEq for PhysicsError
impl StructuralPartialEq for PhysicsError
Auto Trait Implementations§
impl Freeze for PhysicsError
impl RefUnwindSafe for PhysicsError
impl Send for PhysicsError
impl Sync for PhysicsError
impl Unpin for PhysicsError
impl UnsafeUnpin for PhysicsError
impl UnwindSafe for PhysicsError
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
Converts
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> ⓘ
Converts
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