pub enum UnityAssetError {
Io(Error),
Format(String),
UnityFormat {
message: String,
},
Class {
message: String,
},
UnknownClassId {
class_id: String,
},
PropertyNotFound {
property: String,
class_name: String,
},
TypeConversion {
from: String,
to: String,
},
Anchor {
message: String,
},
Version {
message: String,
},
Parse {
message: String,
},
}
Expand description
Main error type for Unity asset parsing operations
Variants§
Io(Error)
IO errors when reading/writing files
Format(String)
Format parsing errors (YAML, binary, etc.)
UnityFormat
Unity-specific format errors
Class
Class-related errors
UnknownClassId
Unknown class ID encountered
PropertyNotFound
Property access errors
TypeConversion
Type conversion errors
Anchor
Anchor-related errors
Version
Version compatibility errors
Parse
Generic parsing errors
Implementations§
Source§impl UnityAssetError
impl UnityAssetError
Sourcepub fn format<S>(message: S) -> UnityAssetError
pub fn format<S>(message: S) -> UnityAssetError
Create a format error
Sourcepub fn unity_format<S>(message: S) -> UnityAssetError
pub fn unity_format<S>(message: S) -> UnityAssetError
Create a Unity format error
Sourcepub fn class<S>(message: S) -> UnityAssetError
pub fn class<S>(message: S) -> UnityAssetError
Create a class error
Sourcepub fn property_not_found<S>(property: S, class_name: S) -> UnityAssetError
pub fn property_not_found<S>(property: S, class_name: S) -> UnityAssetError
Create a property not found error
Sourcepub fn type_conversion<S>(from: S, to: S) -> UnityAssetError
pub fn type_conversion<S>(from: S, to: S) -> UnityAssetError
Create a type conversion error
Sourcepub fn anchor<S>(message: S) -> UnityAssetError
pub fn anchor<S>(message: S) -> UnityAssetError
Create an anchor error
Sourcepub fn version<S>(message: S) -> UnityAssetError
pub fn version<S>(message: S) -> UnityAssetError
Create a version error
Sourcepub fn parse<S>(message: S) -> UnityAssetError
pub fn parse<S>(message: S) -> UnityAssetError
Create a parse error
Trait Implementations§
Source§impl Debug for UnityAssetError
impl Debug for UnityAssetError
Source§impl Display for UnityAssetError
impl Display for UnityAssetError
Source§impl Error for UnityAssetError
impl Error for UnityAssetError
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 From<Error> for UnityAssetError
impl From<Error> for UnityAssetError
Source§fn from(source: Error) -> UnityAssetError
fn from(source: Error) -> UnityAssetError
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for UnityAssetError
impl !RefUnwindSafe for UnityAssetError
impl Send for UnityAssetError
impl Sync for UnityAssetError
impl Unpin for UnityAssetError
impl !UnwindSafe for UnityAssetError
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> 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