Enum SSRuntimeError
pub enum SSRuntimeError {
EmptyData,
InvalidVersion {
expected: u32,
got: u32,
},
AnimationNotFound,
NotLoaded,
InvalidParameter,
MemoryError,
MalformedEffect,
Unknown,
}Expand description
Everything that can go wrong loading or playing back an animation.
Variants§
EmptyData
A resource whose pack did not parse was bound to a context or an effect slot.
Neither the C nor the web face hands out such a resource, so nothing reports
this today. Empty or truncated bytes are not caught here: loading does not
validate the .ssab.
InvalidVersion
SSAB version mismatch.
AnimationNotFound
Animation not found.
NotLoaded
Data is not loaded.
InvalidParameter
Invalid parameter (e.g. frame number out of range).
MemoryError
Reserved: an allocation failure aborts rather than returning this.
MalformedEffect
Effect data is malformed (e.g. missing required fields).
Unknown
Other/unknown error (reserved for future extension).
Implementations§
§impl SSRuntimeError
impl SSRuntimeError
§impl SSRuntimeError
impl SSRuntimeError
pub fn as_str(&self) -> &'static str
pub fn as_str(&self) -> &'static str
The wording, without the payload any variant carries.
Static, so it crosses the C ABI as a plain pointer with no context to
borrow from and no lifetime to respect — which is what
ss_runtime_error_message hands out. core::fmt::Display builds on
this rather than repeating it, so there is one wording per variant.
Trait Implementations§
§impl Clone for SSRuntimeError
impl Clone for SSRuntimeError
§fn clone(&self) -> SSRuntimeError
fn clone(&self) -> SSRuntimeError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for SSRuntimeError
impl Debug for SSRuntimeError
§impl Display for SSRuntimeError
impl Display for SSRuntimeError
§impl Error for SSRuntimeError
Available on non-crate feature std only.
impl Error for SSRuntimeError
std only.1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()