Enum fyrox::generic_animation::core::visitor::VisitError
source · pub enum VisitError {
Show 17 variants
Io(Error),
UnknownFieldType(u8),
FieldDoesNotExist(String),
FieldAlreadyExists(String),
RegionAlreadyExists(String),
InvalidCurrentNode,
FieldTypeDoesNotMatch,
RegionDoesNotExist(String),
NoActiveNode,
NotSupportedFormat,
InvalidName,
TypeMismatch,
RefCellAlreadyMutableBorrowed,
User(String),
UnexpectedRcNullIndex,
PoisonedMutex,
FileLoadError(FileLoadError),
}
Expand description
Errors that may occur while reading or writing Visitor.
Variants§
Io(Error)
An std::io::Error occured while reading or writing a file with Visitor data.
UnknownFieldType(u8)
When a field is encoded as bytes, the field data is prefixed by an identifying byte to allow the bytes to be decoded. This error happens when an identifying byte is expected during decoding, but an unknown value is found in that byte.
FieldDoesNotExist(String)
Attempting to visit a field on a read-mode Visitor when no field in the visitor data has the given name.
FieldAlreadyExists(String)
Attempting to visit a field on a write-mode Visitor when a field already has the given name.
RegionAlreadyExists(String)
Attempting to enter a region on a write-mode Visitor when a region already has the given name.
InvalidCurrentNode
FieldTypeDoesNotMatch
Attempting to visit a field using a read-mode Visitor when when that field was originally written using a value of a different type.
RegionDoesNotExist(String)
Attempting to enter a region on a read-mode Visitor when no region in the visitor’s data has the given name.
NoActiveNode
The Visitor tried to leave is current node, but somehow it had no current node. This should never happen.
NotSupportedFormat
The Visitor::MAGIC bytes were missing from the beginning of encoded Visitor data.
InvalidName
Some sequence of bytes was not in UTF8 format.
TypeMismatch
Visitor data can be self-referential, such as when the data contains multiple Rc references to a single shared value. This causes the visitor to store the data once and then later references to the same value point back to its first occurrence. This error occurs if one of these references points to a value of the wrong type.
RefCellAlreadyMutableBorrowed
Attempting to visit a mutably borrowed RefCell.
User(String)
A plain-text error message that could indicate almost anything.
UnexpectedRcNullIndex
Rc and Arc values store an “Id” value in the Visitor data which is based in their internal pointer. This error indicates that while reading this data, one of those Id values was discovered by be 0.
PoisonedMutex
A poison error occurred while trying to visit a mutex.
FileLoadError(FileLoadError)
A FileLoadError was encountered while trying to decode Visitor data from a file.
Trait Implementations§
source§impl Debug for VisitError
impl Debug for VisitError
source§impl Display for VisitError
impl Display for VisitError
source§impl Error for VisitError
impl Error for VisitError
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
source§impl From<Error> for VisitError
impl From<Error> for VisitError
source§fn from(io_err: Error) -> VisitError
fn from(io_err: Error) -> VisitError
source§impl From<FileLoadError> for VisitError
impl From<FileLoadError> for VisitError
source§fn from(e: FileLoadError) -> VisitError
fn from(e: FileLoadError) -> VisitError
source§impl From<FromUtf8Error> for VisitError
impl From<FromUtf8Error> for VisitError
source§fn from(_: FromUtf8Error) -> VisitError
fn from(_: FromUtf8Error) -> VisitError
source§impl<T> From<PoisonError<&mut T>> for VisitError
impl<T> From<PoisonError<&mut T>> for VisitError
source§fn from(_: PoisonError<&mut T>) -> VisitError
fn from(_: PoisonError<&mut T>) -> VisitError
source§impl<T> From<PoisonError<MutexGuard<'_, T>>> for VisitError
impl<T> From<PoisonError<MutexGuard<'_, T>>> for VisitError
source§fn from(_: PoisonError<MutexGuard<'_, T>>) -> VisitError
fn from(_: PoisonError<MutexGuard<'_, T>>) -> VisitError
source§impl<T> From<PoisonError<RwLockWriteGuard<'_, T>>> for VisitError
impl<T> From<PoisonError<RwLockWriteGuard<'_, T>>> for VisitError
source§fn from(_: PoisonError<RwLockWriteGuard<'_, T>>) -> VisitError
fn from(_: PoisonError<RwLockWriteGuard<'_, T>>) -> VisitError
source§impl From<String> for VisitError
impl From<String> for VisitError
source§fn from(s: String) -> VisitError
fn from(s: String) -> VisitError
source§impl From<VisitError> for CurveResourceError
impl From<VisitError> for CurveResourceError
source§fn from(e: VisitError) -> CurveResourceError
fn from(e: VisitError) -> CurveResourceError
source§impl From<VisitError> for MaterialError
impl From<VisitError> for MaterialError
source§fn from(value: VisitError) -> MaterialError
fn from(value: VisitError) -> MaterialError
source§impl From<VisitError> for ModelLoadError
impl From<VisitError> for ModelLoadError
source§fn from(e: VisitError) -> ModelLoadError
fn from(e: VisitError) -> ModelLoadError
Auto Trait Implementations§
impl Freeze for VisitError
impl !RefUnwindSafe for VisitError
impl Send for VisitError
impl Sync for VisitError
impl Unpin for VisitError
impl !UnwindSafe for VisitError
Blanket Implementations§
source§impl<T> AsyncTaskResult for T
impl<T> AsyncTaskResult for T
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
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
source§impl<T> FieldValue for Twhere
T: 'static,
impl<T> FieldValue for Twhere
T: 'static,
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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 moresource§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> ScriptMessagePayload for T
impl<T> ScriptMessagePayload for T
source§fn as_any_ref(&self) -> &(dyn Any + 'static)
fn as_any_ref(&self) -> &(dyn Any + 'static)
self
as &dyn Any
source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
self
as &dyn Any
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>
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
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
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.